Skip to content

Commit

Permalink
m91-b99622c05a-2 force MTLLanguageVersion2_0
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Apr 29, 2021
1 parent f6b13d9 commit 3c5d6bc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 25 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ on:
default: 'false'

env:
#version: m91-b99622c05a
version: m90-f1e4f21baf
version: m91-b99622c05a-2

jobs:
macos:
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,20 @@ Prebuilt binaries can be found [in releases](https://github.com/JetBrains/skia-b

## Building next version of Skia

Update `skia_branch`, `skia_commit` and `release` in [.github/workflows/build.yml](https://github.com/JetBrains/skia-build/blob/master/.github/workflows/build.yml).
Update `version` in [.github/workflows/build.yml](https://github.com/JetBrains/skia-build/blob/master/.github/workflows/build.yml).

## Building locally

```sh
python3 script/checkout.py --version m89-19889d74fa
python3 script/checkout.py --version m91-b99622c05a
python3 script/build.py
python3 script/archive.py
```

More options can be specified for checkout:

```sh
python3 script/checkout.py [--version VERSION]
```

To build a debug build:

```sh
python3 script/checkout.py --version m89-19889d74fa
python3 script/checkout.py --version m91-b99622c05a
python3 script/build.py --debug
python3 script/archive.py --debug
```
12 changes: 0 additions & 12 deletions patches/11145_BUILD.patch

This file was deleted.

14 changes: 14 additions & 0 deletions patches/GrMtlUtil.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/gpu/mtl/GrMtlUtil.mm b/src/gpu/mtl/GrMtlUtil.mm
index 9d697bd79f..9711abdbf1 100644
--- a/src/gpu/mtl/GrMtlUtil.mm
+++ b/src/gpu/mtl/GrMtlUtil.mm
@@ -104,6 +104,9 @@ bool GrSkSLToMSL(const GrMtlGpu* gpu,
if (gpu->caps()->shaderCaps()->canUseFastMath()) {
options.fastMathEnabled = true;
}
+ if (@available(macOS 10.13, iOS 11.0, *)) {
+ options.languageVersion = MTLLanguageVersion2_0;
+ }

NSError* error = nil;
#if defined(SK_BUILD_FOR_MAC)
4 changes: 2 additions & 2 deletions script/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def main():
# 'skia_use_icu=true',
'skia_use_system_icu=false',
# 'skia_enable_skshaper=true',
'skia_enable_svg=true',
# 'skia_enable_svg=true',
'skia_enable_skottie=true'
]

Expand Down Expand Up @@ -68,7 +68,7 @@ def main():
gn = 'gn.exe' if 'windows' == system else 'gn'
subprocess.check_call([os.path.join('bin', gn), 'gen', out, '--args=' + ' '.join(args)])
ninja = 'ninja.exe' if 'windows' == system else 'ninja'
subprocess.check_call([os.path.join('..', 'depot_tools', ninja), '-C', out, 'skia', 'modules', 'modules/svg'])
subprocess.check_call([os.path.join('..', 'depot_tools', ninja), '-C', out, 'skia', 'modules'])

return 0

Expand Down

0 comments on commit 3c5d6bc

Please sign in to comment.