cargo-xcodebuild
cargo-xcodebuild copied to clipboard
when building and running wgpu I get errors looking for Metal adapter.
When attempting to run the wgpu on m1 mac example I encounter this error. I know it has to do with selecting the adapter and I'm not sure why it isn't finding Metal ..
cargo xcodebuild run ✹ Compiling wgpu v0.1.0 (/Users/gennaroschiano/Documents/GitHub/cargo-xcodebuild/examples/wgpu) error[E0599]: no associated item named
Metalfound for struct
Backendsin the current scope --> examples/wgpu/src/framework.rs:89:86 | 89 | let backend = wgpu::util::backend_bits_from_env().unwrap_or_else(wgpu::Backends::Metal); | ^^^^^ associated item not found in
Backends`
For more information about this error, try rustc --explain E0599
.
error: could not compile wgpu
due to previous error
Compiling wgpu v0.1.0 (/Users/gennaroschiano/Documents/GitHub/cargo-xcodebuild/examples/wgpu)
error[E0599]: no associated item named Metal
found for struct Backends
in the current scope
--> examples/wgpu/src/framework.rs:89:86
|
89 | let backend = wgpu::util::backend_bits_from_env().unwrap_or_else(wgpu::Backends::Metal);
| ^^^^^ associated item not found in Backends
For more information about this error, try rustc --explain E0599
.
error: could not compile wgpu
due to previous error
Compiling wgpu v0.1.0 (/Users/gennaroschiano/Documents/GitHub/cargo-xcodebuild/examples/wgpu)
error[E0599]: no associated item named Metal
found for struct Backends
in the current scope
--> examples/wgpu/src/framework.rs:89:86
|
89 | let backend = wgpu::util::backend_bits_from_env().unwrap_or_else(wgpu::Backends::Metal);
| ^^^^^ associated item not found in Backends
For more information about this error, try rustc --explain E0599
.
error: could not compile wgpu
due to previous error
[2022-07-04T15:42:38Z ERROR mobile_device] Value from property DeviceClass
is null
thread 'main' panicked at 'called Option::unwrap()
on a None
value', /Users/gennaroschiano/.cargo/registry/src/github.com-1ecc6299db9ec823/mobile-device-0.1.0/src/lib.rs:115:76
stack backtrace:
0: rust_begin_unwind
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
2: core::panicking::panic
at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:48:5
3: mobile_device::get_device_list
4: cargo_xcodebuild::xcodebuild::Xcodebuild::find_device
5: cargo_xcodebuild::xcodebuild::Xcodebuild::build
6: cargo_xcodebuild::main`
thanks for any help in advance!
I am able to get the xcode project to work and do somewhat of a build... but it is very janky... this is the error I get while building in xcode after a crash
2022-07-04 11:57:40.639920-0400 wgpu_xcodebuild_example[34014:587671] Metal GPU Frame Capture Enabled 2022-07-04 11:57:40.640017-0400 wgpu_xcodebuild_example[34014:587671] Metal API Validation Enabled Using Apple iOS simulator GPU (Metal) MTLValidateFeatureSupport:4849: failed assertion
Sampler Compare Function is not supported on this device'
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/gennaroschiano/Library/Developer/Xcode/DerivedData/wgpu_xcodebuild_example-gngjvhffzynrakclzoiqlkarsshp/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMTLCapture.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/gennaroschiano/Library/Developer/Xcode/DerivedData/wgpu_xcodebuild_example-gngjvhffzynrakclzoiqlkarsshp/Build/Products/Debug-iphonesimulator
MTLValidateFeatureSupport:4849: failed assertion Sampler Compare Function is not supported on this device' CoreSimulator 802.6 - Device: 13PROMAX (B563A558-9AD9-45F3-BDDC-86780B62DF05) - Runtime: iOS 15.4 (19E240) - DeviceType: iPhone 13 Pro Max (lldb)
@gschian0 Could you rerun you test with wgpu
0.13.2? What about release build? Is it works?
Sure! Will keep You posted.