diff --git a/drivers/AdrenoMetal b/drivers/AdrenoMetal index ded1122..d6ca655 160000 --- a/drivers/AdrenoMetal +++ b/drivers/AdrenoMetal @@ -1 +1 @@ -Subproject commit ded1122911337050bb6e71110d2a41b33607040c +Subproject commit d6ca6557039cf9e0c3a1d1a58c560f2e55e8e9bb diff --git a/scripts/check-native-metal-frontend-host.py b/scripts/check-native-metal-frontend-host.py index d7d531a..63fe21b 100644 --- a/scripts/check-native-metal-frontend-host.py +++ b/scripts/check-native-metal-frontend-host.py @@ -266,3 +266,19 @@ print('\n'.join(summary)) if run.returncode or not any(l.startswith('selftest code 0 ') for l in summary) or not any(l.endswith('last 660f') for l in summary): sys.exit('the plugin bridge phase failed with scattered BOs; see %s' % (OUT / 'plugin_sequence_scatter.log')) print('PASS: the same phase with scattered single-page spans and no contiguous run above 8 MiB (results unchecked)') +# Core Image over the frontend, and the Core Image kernel library's answers Apple's Metal gives (no function names, a kernel by name of +# function type 4): iPadOS 27's Core Image takes its DAG kernels so. +coreimage = OUT / 'coreimage_host' +subprocess.run(['xcrun', 'clang++', *flags, KIT / 'NativeBridgeMetalFrontend.mm', KIT / 'bridge/coreimage_host.mm', + ROOT / 'build/adreno-metal-bridge/host/libadreno_metal_bridge.a', '-framework', 'Foundation', '-framework', 'Metal', + '-framework', 'IOSurface', '-framework', 'CoreFoundation', '-framework', 'CoreImage', '-framework', 'CoreGraphics', + '-o', coreimage], check=True) +kernels = '/System/Library/Frameworks/CoreImage.framework/Versions/A/Resources/ci_stdlib.metallib' +cicache = OUT / 'coreimage-cache' +cicache.mkdir(exist_ok=True) +for name, extra in [('apple', {'NMB_SYSTEM_DEVICE': '1'}), ('frontend', {})]: + run = subprocess.run([str(coreimage), loader, str(cicache), kernels], env=dict(os.environ, **extra), capture_output=True, text=True, timeout=600) + (OUT / ('coreimage_%s.log' % name)).write_text(run.stdout + run.stderr) + if run.returncode or not any(l.startswith('PASS') for l in run.stdout.splitlines()): + sys.exit('Core Image over the %s device failed; see %s' % (name, OUT / ('coreimage_%s.log' % name))) +print('PASS: Core Image renders over the frontend; its kernel library answers as Apple\'s Metal does')