feat(gpu): metal2vulkan development tip, BOs from system memory
The translator pin moves to upstream development 624bab39 (the inexact-math work) and records its branch; check-metal2vulkan-pin.py checks the pin against the branch the record names. Bridge patch 0018 rounds heap texture sizes to their alignment. Adreno740 takes user BOs from system memory, with no fixed pool.
This commit is contained in:
1 parent
fa2ff312f5
commit
16d7ff9632
5 files changed
+19
-14
No files matched your search
+1
-1
Submodule drivers/Adreno740 updated: aa015f7926...882f4bf36c.
+1
-1
Submodule drivers/AdrenoMetal updated: 0f6050fbb9...8c86579f07.
@@ -45,7 +45,10 @@ PATCHES = [ROOT / 'drivers/AdrenoMetal/bridge/patches' / name for name in [
|
||||
'0016-refuse-rebinds.patch',
|
||||
# A read-only source of shader-cache entries behind the directory (the pipelines compiled ahead on the host, read on demand from the
|
||||
# userdata import region): an entry the directory lacks is asked of it, and nothing is copied into the directory.
|
||||
'0017-shader-cache-fallback-source.patch']]
|
||||
'0017-shader-cache-fallback-source.patch',
|
||||
# A heap texture's own-device answer rounded up to a multiple of its alignment, as Metal's answers are: a heap sized as the sum of
|
||||
# its textures' answers then holds them (iconservicesagent's Core Image heaps ran out: OutOfMemory(Heap)).
|
||||
'0018-heap-texture-size-a-multiple-of-its-alignment.patch']]
|
||||
|
||||
|
||||
def git_tree(*steps):
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Check the translator source the native Metal bridge builds from against upstream, by git alone.
|
||||
|
||||
1. The pin (scripts/data/gpu-metal-vulkan-inputs.json) is a commit of upstream's master; with --latest, its tip (fetched now).
|
||||
1. The pin (scripts/data/gpu-metal-vulkan-inputs.json) is a commit of the upstream branch it names (master when it names none); with
|
||||
--latest, that branch's tip (fetched now).
|
||||
2. The checkout (.cache/gpu-reference/metal2vulkan) is at the pin.
|
||||
3. The recorded patches (the list build-adreno-metal-bridge.py applies) apply in order to the pin's own tree, in a scratch index, with no
|
||||
three-way merge and no fuzz.
|
||||
@@ -20,10 +21,10 @@ import sys
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--source', type=Path, default=ROOT / '.cache/gpu-reference/metal2vulkan')
|
||||
parser.add_argument('--latest', action='store_true', help="also require the pin to be upstream master's tip, fetched now")
|
||||
parser.add_argument('--latest', action='store_true', help="also require the pin to be its upstream branch's tip, fetched now")
|
||||
args = parser.parse_args()
|
||||
inputs = json.loads((ROOT / 'scripts/data/gpu-metal-vulkan-inputs.json').read_text())['translator']
|
||||
pin, source = inputs['commit'], args.source
|
||||
pin, branch, source = inputs['commit'], inputs.get('branch', 'master'), args.source
|
||||
|
||||
|
||||
def git(*argv, env=None, check=True):
|
||||
@@ -48,13 +49,13 @@ if sorted(names) != on_disk:
|
||||
fail('the build lists %s, the directory holds %s' % (names, on_disk))
|
||||
patches = [directory / name for name in names]
|
||||
|
||||
git('fetch', '-q', 'origin', 'master')
|
||||
tip = git('rev-parse', 'origin/master').stdout.strip()
|
||||
if git('merge-base', '--is-ancestor', pin, 'origin/master', check=False).returncode:
|
||||
fail('pin %s is no commit of upstream master' % pin)
|
||||
behind = int(git('rev-list', '--count', '%s..origin/master' % pin).stdout)
|
||||
git('fetch', '-q', 'origin', '+refs/heads/%s:refs/remotes/origin/%s' % (branch, branch))
|
||||
tip = git('rev-parse', 'origin/' + branch).stdout.strip()
|
||||
if git('merge-base', '--is-ancestor', pin, 'origin/' + branch, check=False).returncode:
|
||||
fail('pin %s is no commit of upstream %s' % (pin, branch))
|
||||
behind = int(git('rev-list', '--count', '%s..origin/%s' % (pin, branch)).stdout)
|
||||
if args.latest and pin != tip:
|
||||
fail('pin %s is %d commits behind upstream master %s' % (pin[:12], behind, tip[:12]))
|
||||
fail('pin %s is %d commits behind upstream %s %s' % (pin[:12], behind, branch, tip[:12]))
|
||||
head = git('rev-parse', 'HEAD').stdout.strip()
|
||||
if head != pin:
|
||||
fail('checkout at %s, pin %s' % (head, pin))
|
||||
@@ -82,7 +83,7 @@ for name, digest in inputs['files'].items():
|
||||
blob = subprocess.run(['git', '-C', str(source), 'show', '%s:%s' % (pin, name)], capture_output=True)
|
||||
if blob.returncode or hashlib.sha256(blob.stdout).hexdigest() != digest:
|
||||
fail('pinned file %s differs from the pin record' % name)
|
||||
print('upstream master %s, pin %s (%d commits behind), checkout %s' % (tip[:12], pin[:12], behind,
|
||||
print('upstream %s %s, pin %s (%d commits behind), checkout %s' % (branch, tip[:12], pin[:12], behind,
|
||||
'patched' if current == patched else 'unpatched'))
|
||||
for line in git('diff', '--numstat', pinned, patched).stdout.splitlines():
|
||||
added, removed, path = line.split('\t')
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
},
|
||||
"translator": {
|
||||
"repository": "https://github.com/steelbrain/metal2vulkan",
|
||||
"commit": "0dfdbcd59d235e37ba13b87a5ab30835b5bb9e35",
|
||||
"commit": "624bab3918de5b978e1101517abca2b4fa426565",
|
||||
"branch": "development",
|
||||
"clone": "depth 1, blob filter, checked out source",
|
||||
"files": {
|
||||
"README.md": "0df40b723fd5ea51ca91b9e59fa5dac774015dde128a31b6834c3c8efb69a316",
|
||||
|
||||
Reference in new issue
Block a user