From 1f550ddec2f3519f3ee7fd9cb1941b5642796ae2 Mon Sep 17 00:00:00 2001 From: richard-lunarg Date: Tue, 22 Dec 2020 16:50:21 -0500 Subject: Vulkaninfo for iOS devices --- .../iOS/vulkaninfo.xcodeproj/project.pbxproj | 411 +++++++++++++++++++++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 73756 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 72 ++++ .../xcschemes/xcschememanagement.plist | 14 + vulkaninfo/iOS/vulkaninfo/AppDelegate.h | 25 ++ vulkaninfo/iOS/vulkaninfo/AppDelegate.m | 51 +++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 103 ++++++ .../AppIcon.appiconset/VulkanAppLogo1024.png | Bin 0 -> 38379 bytes .../AppIcon.appiconset/VulkanLogo120-1.png | Bin 0 -> 9088 bytes .../AppIcon.appiconset/VulkanLogo120.png | Bin 0 -> 9088 bytes .../AppIcon.appiconset/VulkanLogo152.png | Bin 0 -> 10879 bytes .../AppIcon.appiconset/VulkanLogo167.png | Bin 0 -> 11742 bytes .../iOS/vulkaninfo/Assets.xcassets/Contents.json | 6 + .../vulkaninfo/Base.lproj/LaunchScreen.storyboard | 25 ++ .../iOS/vulkaninfo/Base.lproj/Main.storyboard | 46 +++ vulkaninfo/iOS/vulkaninfo/Info.plist | 71 ++++ vulkaninfo/iOS/vulkaninfo/SceneDelegate.h | 27 ++ vulkaninfo/iOS/vulkaninfo/SceneDelegate.m | 67 ++++ vulkaninfo/iOS/vulkaninfo/ViewController.h | 28 ++ vulkaninfo/iOS/vulkaninfo/ViewController.m | 43 +++ vulkaninfo/iOS/vulkaninfo/main.mm | 51 +++ vulkaninfo/iOS/vulkaninfo/metal_iosview.h | 31 ++ vulkaninfo/iOS/vulkaninfo/metal_iosview.m | 51 +++ vulkaninfo/iOS/vulkaninfo/vulkaninfo.entitlements | 10 + vulkaninfo/vulkaninfo.cpp | 9 +- 28 files changed, 1164 insertions(+), 3 deletions(-) create mode 100644 vulkaninfo/iOS/vulkaninfo.xcodeproj/project.pbxproj create mode 100644 vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcuserdata/lunarg.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 vulkaninfo/iOS/vulkaninfo/AppDelegate.h create mode 100644 vulkaninfo/iOS/vulkaninfo/AppDelegate.m create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanAppLogo1024.png create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120-1.png create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120.png create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo152.png create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo167.png create mode 100644 vulkaninfo/iOS/vulkaninfo/Assets.xcassets/Contents.json create mode 100644 vulkaninfo/iOS/vulkaninfo/Base.lproj/LaunchScreen.storyboard create mode 100644 vulkaninfo/iOS/vulkaninfo/Base.lproj/Main.storyboard create mode 100644 vulkaninfo/iOS/vulkaninfo/Info.plist create mode 100644 vulkaninfo/iOS/vulkaninfo/SceneDelegate.h create mode 100644 vulkaninfo/iOS/vulkaninfo/SceneDelegate.m create mode 100644 vulkaninfo/iOS/vulkaninfo/ViewController.h create mode 100644 vulkaninfo/iOS/vulkaninfo/ViewController.m create mode 100644 vulkaninfo/iOS/vulkaninfo/main.mm create mode 100644 vulkaninfo/iOS/vulkaninfo/metal_iosview.h create mode 100644 vulkaninfo/iOS/vulkaninfo/metal_iosview.m create mode 100644 vulkaninfo/iOS/vulkaninfo/vulkaninfo.entitlements diff --git a/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.pbxproj b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.pbxproj new file mode 100644 index 00000000..41ab580a --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.pbxproj @@ -0,0 +1,411 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + A06CCB40258D04F700B0A7DA /* vulkaninfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A06CCB3F258D04F700B0A7DA /* vulkaninfo.cpp */; }; + A06CCB44258D0BE300B0A7DA /* MoltenVK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A06CCB43258D0BE300B0A7DA /* MoltenVK.xcframework */; }; + A07BD431255B45E000B79448 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A07BD430255B45E000B79448 /* AppDelegate.m */; }; + A07BD434255B45E000B79448 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A07BD433255B45E000B79448 /* SceneDelegate.m */; }; + A07BD437255B45E000B79448 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A07BD436255B45E000B79448 /* ViewController.m */; }; + A07BD43A255B45E100B79448 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A07BD438255B45E100B79448 /* Main.storyboard */; }; + A07BD43C255B45E200B79448 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A07BD43B255B45E200B79448 /* Assets.xcassets */; }; + A07BD43F255B45E200B79448 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A07BD43D255B45E200B79448 /* LaunchScreen.storyboard */; }; + A07BD442255B45E200B79448 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = A07BD441255B45E200B79448 /* main.mm */; }; + A07BD48D255B4DEE00B79448 /* metal_iosview.m in Sources */ = {isa = PBXBuildFile; fileRef = A07BD48C255B4DEE00B79448 /* metal_iosview.m */; }; + A07BD4A5255C914A00B79448 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A07BD4A4255C914A00B79448 /* WebKit.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + A06CCB3F258D04F700B0A7DA /* vulkaninfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = vulkaninfo.cpp; path = ../vulkaninfo.cpp; sourceTree = ""; }; + A06CCB43258D0BE300B0A7DA /* MoltenVK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MoltenVK.xcframework; path = ../../../../VulkanSDK/MoltenVK/MoltenVK.xcframework; sourceTree = ""; }; + A07BD42C255B45E000B79448 /* vulkaninfo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = vulkaninfo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A07BD42F255B45E000B79448 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + A07BD430255B45E000B79448 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + A07BD432255B45E000B79448 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + A07BD433255B45E000B79448 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + A07BD435255B45E000B79448 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + A07BD436255B45E000B79448 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + A07BD439255B45E100B79448 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A07BD43B255B45E200B79448 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A07BD43E255B45E200B79448 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + A07BD440255B45E200B79448 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A07BD441255B45E200B79448 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = ""; }; + A07BD48C255B4DEE00B79448 /* metal_iosview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = metal_iosview.m; sourceTree = ""; }; + A07BD48F255B4DF900B79448 /* metal_iosview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = metal_iosview.h; sourceTree = ""; }; + A07BD4A4255C914A00B79448 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + A0F9358C2575C05A00CFA527 /* vulkaninfo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = vulkaninfo.entitlements; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A07BD429255B45E000B79448 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A06CCB44258D0BE300B0A7DA /* MoltenVK.xcframework in Frameworks */, + A07BD4A5255C914A00B79448 /* WebKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A06CCB3E258D04E200B0A7DA /* Shared */ = { + isa = PBXGroup; + children = ( + A06CCB3F258D04F700B0A7DA /* vulkaninfo.cpp */, + ); + name = Shared; + sourceTree = ""; + }; + A07BD423255B45E000B79448 = { + isa = PBXGroup; + children = ( + A06CCB3E258D04E200B0A7DA /* Shared */, + A07BD473255B48AB00B79448 /* Frameworks */, + A07BD42E255B45E000B79448 /* vulkaninfo */, + A07BD42D255B45E000B79448 /* Products */, + ); + sourceTree = ""; + }; + A07BD42D255B45E000B79448 /* Products */ = { + isa = PBXGroup; + children = ( + A07BD42C255B45E000B79448 /* vulkaninfo.app */, + ); + name = Products; + sourceTree = ""; + }; + A07BD42E255B45E000B79448 /* vulkaninfo */ = { + isa = PBXGroup; + children = ( + A0F9358C2575C05A00CFA527 /* vulkaninfo.entitlements */, + A07BD48F255B4DF900B79448 /* metal_iosview.h */, + A07BD48C255B4DEE00B79448 /* metal_iosview.m */, + A07BD42F255B45E000B79448 /* AppDelegate.h */, + A07BD430255B45E000B79448 /* AppDelegate.m */, + A07BD432255B45E000B79448 /* SceneDelegate.h */, + A07BD433255B45E000B79448 /* SceneDelegate.m */, + A07BD435255B45E000B79448 /* ViewController.h */, + A07BD436255B45E000B79448 /* ViewController.m */, + A07BD438255B45E100B79448 /* Main.storyboard */, + A07BD43B255B45E200B79448 /* Assets.xcassets */, + A07BD43D255B45E200B79448 /* LaunchScreen.storyboard */, + A07BD440255B45E200B79448 /* Info.plist */, + A07BD441255B45E200B79448 /* main.mm */, + ); + path = vulkaninfo; + sourceTree = ""; + }; + A07BD473255B48AB00B79448 /* Frameworks */ = { + isa = PBXGroup; + children = ( + A06CCB43258D0BE300B0A7DA /* MoltenVK.xcframework */, + A07BD4A4255C914A00B79448 /* WebKit.framework */, + ); + path = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A07BD42B255B45E000B79448 /* vulkaninfo */ = { + isa = PBXNativeTarget; + buildConfigurationList = A07BD445255B45E200B79448 /* Build configuration list for PBXNativeTarget "vulkaninfo" */; + buildPhases = ( + A07BD428255B45E000B79448 /* Sources */, + A07BD429255B45E000B79448 /* Frameworks */, + A07BD42A255B45E000B79448 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = vulkaninfo; + productName = vulkaninfo; + productReference = A07BD42C255B45E000B79448 /* vulkaninfo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A07BD424255B45E000B79448 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1210; + TargetAttributes = { + A07BD42B255B45E000B79448 = { + CreatedOnToolsVersion = 12.1; + }; + }; + }; + buildConfigurationList = A07BD427255B45E000B79448 /* Build configuration list for PBXProject "vulkaninfo" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = A07BD423255B45E000B79448; + productRefGroup = A07BD42D255B45E000B79448 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A07BD42B255B45E000B79448 /* vulkaninfo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A07BD42A255B45E000B79448 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A07BD43F255B45E200B79448 /* LaunchScreen.storyboard in Resources */, + A07BD43C255B45E200B79448 /* Assets.xcassets in Resources */, + A07BD43A255B45E100B79448 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A07BD428255B45E000B79448 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A07BD437255B45E000B79448 /* ViewController.m in Sources */, + A07BD431255B45E000B79448 /* AppDelegate.m in Sources */, + A06CCB40258D04F700B0A7DA /* vulkaninfo.cpp in Sources */, + A07BD442255B45E200B79448 /* main.mm in Sources */, + A07BD48D255B4DEE00B79448 /* metal_iosview.m in Sources */, + A07BD434255B45E000B79448 /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + A07BD438255B45E100B79448 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A07BD439255B45E100B79448 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + A07BD43D255B45E200B79448 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A07BD43E255B45E200B79448 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A07BD443255B45E200B79448 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + A07BD444255B45E200B79448 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A07BD446255B45E200B79448 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = vulkaninfo/vulkaninfo.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 5; + DEVELOPMENT_TEAM = 4777T3625D; + GCC_PREPROCESSOR_DEFINITIONS = ( + VK_USE_PLATFORM_IOS_MVK, + VK_ENABLE_BETA_EXTENSIONS, + ); + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../build/Vulkan-Headers/include\"", + "\"$(SRCROOT)/../generated\"", + "\"$(SRCROOT)/..\"", + "\"$(SRCROOT)/vulkaninfo\"", + ); + INFOPLIST_FILE = vulkaninfo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.lunarg.vulkaninfo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + A07BD447255B45E200B79448 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = vulkaninfo/vulkaninfo.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 5; + DEVELOPMENT_TEAM = 4777T3625D; + GCC_PREPROCESSOR_DEFINITIONS = ( + VK_USE_PLATFORM_IOS_MVK, + VK_ENABLE_BETA_EXTENSIONS, + ); + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../build/Vulkan-Headers/include\"", + "\"$(SRCROOT)/../generated\"", + "\"$(SRCROOT)/..\"", + "\"$(SRCROOT)/vulkaninfo\"", + ); + INFOPLIST_FILE = vulkaninfo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.lunarg.vulkaninfo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A07BD427255B45E000B79448 /* Build configuration list for PBXProject "vulkaninfo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A07BD443255B45E200B79448 /* Debug */, + A07BD444255B45E200B79448 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A07BD445255B45E200B79448 /* Build configuration list for PBXNativeTarget "vulkaninfo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A07BD446255B45E200B79448 /* Debug */, + A07BD447255B45E200B79448 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A07BD424255B45E000B79448 /* Project object */; +} diff --git a/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcuserdata/lunarg.xcuserdatad/UserInterfaceState.xcuserstate b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcuserdata/lunarg.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..dceb7e8c Binary files /dev/null and b/vulkaninfo/iOS/vulkaninfo.xcodeproj/project.xcworkspace/xcuserdata/lunarg.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 00000000..5f774687 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcschemes/xcschememanagement.plist b/vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..13496336 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo.xcodeproj/xcuserdata/lunarg.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + vulkaninfo.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/vulkaninfo/iOS/vulkaninfo/AppDelegate.h b/vulkaninfo/iOS/vulkaninfo/AppDelegate.h new file mode 100644 index 00000000..69d01817 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/AppDelegate.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2020 The Khronos Group Inc. + * Copyright (c) 2020 Valve Corporation + * Copyright (c) 2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Richard Wright + */ + +#import + +@interface AppDelegate : UIResponder + +@end diff --git a/vulkaninfo/iOS/vulkaninfo/AppDelegate.m b/vulkaninfo/iOS/vulkaninfo/AppDelegate.m new file mode 100644 index 00000000..e8c0e3f4 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/AppDelegate.m @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020 The Khronos Group Inc. + * Copyright (c) 2020 Valve Corporation + * Copyright (c) 2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Richard Wright + */ + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + +#pragma mark - UISceneSession lifecycle + +- (UISceneConfiguration *)application:(UIApplication *)application + configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession + options:(UISceneConnectionOptions *)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + +- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after + // application:didFinishLaunchingWithOptions. Use this method to release any resources that were specific to the discarded + // scenes, as they will not return. +} + +@end diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AccentColor.colorset/Contents.json b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/Contents.json b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..efcf4234 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,103 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "VulkanLogo120-1.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "VulkanLogo120.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "VulkanLogo152.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "filename" : "VulkanLogo167.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "filename" : "VulkanAppLogo1024.png", + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanAppLogo1024.png b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanAppLogo1024.png new file mode 100644 index 00000000..3c8f2282 Binary files /dev/null and b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanAppLogo1024.png differ diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120-1.png b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120-1.png new file mode 100644 index 00000000..04126379 Binary files /dev/null and b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120-1.png differ diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120.png b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120.png new file mode 100644 index 00000000..04126379 Binary files /dev/null and b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo120.png differ diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo152.png b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo152.png new file mode 100644 index 00000000..23e503d2 Binary files /dev/null and b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo152.png differ diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo167.png b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo167.png new file mode 100644 index 00000000..1545d57b Binary files /dev/null and b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/AppIcon.appiconset/VulkanLogo167.png differ diff --git a/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/Contents.json b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/vulkaninfo/iOS/vulkaninfo/Base.lproj/LaunchScreen.storyboard b/vulkaninfo/iOS/vulkaninfo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vulkaninfo/iOS/vulkaninfo/Base.lproj/Main.storyboard b/vulkaninfo/iOS/vulkaninfo/Base.lproj/Main.storyboard new file mode 100644 index 00000000..876d52ae --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/Base.lproj/Main.storyboard @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vulkaninfo/iOS/vulkaninfo/Info.plist b/vulkaninfo/iOS/vulkaninfo/Info.plist new file mode 100644 index 00000000..2d3a4b00 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/Info.plist @@ -0,0 +1,71 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSApplicationCategoryType + + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UIFileSharingEnabled + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/vulkaninfo/iOS/vulkaninfo/SceneDelegate.h b/vulkaninfo/iOS/vulkaninfo/SceneDelegate.h new file mode 100644 index 00000000..39934557 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/SceneDelegate.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2020 The Khronos Group Inc. + * Copyright (c) 2020 Valve Corporation + * Copyright (c) 2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Richard Wright + */ + +#import + +@interface SceneDelegate : UIResponder + +@property(strong, nonatomic) UIWindow* window; + +@end diff --git a/vulkaninfo/iOS/vulkaninfo/SceneDelegate.m b/vulkaninfo/iOS/vulkaninfo/SceneDelegate.m new file mode 100644 index 00000000..8188b717 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/SceneDelegate.m @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2020 The Khronos Group Inc. + * Copyright (c) 2020 Valve Corporation + * Copyright (c) 2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Richard Wright + */ + +#import "SceneDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + +- (void)scene:(UIScene *)scene + willConnectToSession:(UISceneSession *)session + options:(UISceneConnectionOptions *)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see + // `application:configurationForConnectingSceneSession` instead). +} + +- (void)sceneDidDisconnect:(UIScene *)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` + // instead). +} + +- (void)sceneDidBecomeActive:(UIScene *)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. +} + +- (void)sceneWillResignActive:(UIScene *)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + +- (void)sceneWillEnterForeground:(UIScene *)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + +- (void)sceneDidEnterBackground:(UIScene *)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. +} + +@end diff --git a/vulkaninfo/iOS/vulkaninfo/ViewController.h b/vulkaninfo/iOS/vulkaninfo/ViewController.h new file mode 100644 index 00000000..f897dc9a --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/ViewController.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 The Khronos Group Inc. + * Copyright (c) 2020 Valve Corporation + * Copyright (c) 2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Richard Wright + */ + +#import +#import + +@interface ViewController : UIViewController + +@property(weak, nonatomic) IBOutlet WKWebView *webView; + +@end diff --git a/vulkaninfo/iOS/vulkaninfo/ViewController.m b/vulkaninfo/iOS/vulkaninfo/ViewController.m new file mode 100644 index 00000000..573c7da0 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/ViewController.m @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2020 The Khronos Group Inc. + * Copyright (c) 2020 Valve Corporation + * Copyright (c) 2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Richard Wright + */ + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Get the HTML version of the output and display it in a web view. + NSArray *docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *myPath = [docPath objectAtIndex:0]; + NSString *filePath = [myPath stringByAppendingPathComponent:@"/vulkaninfo.html"]; + + NSURL *url = [NSURL fileURLWithPath:filePath]; + [webView loadFileURL:url allowingReadAccessToURL:url.URLByDeletingLastPathComponent]; +} + +@synthesize webView; + +@end diff --git a/vulkaninfo/iOS/vulkaninfo/main.mm b/vulkaninfo/iOS/vulkaninfo/main.mm new file mode 100644 index 00000000..0643a490 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/main.mm @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020 The Khronos Group Inc. + * Copyright (c) 2020 Valve Corporation + * Copyright (c) 2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Richard Wright + */ + +#import +#import "AppDelegate.h" + +int vulkanInfoMain(int argc, char **argv); + +int main(int argc, char *argv[]) { + // First thing we are going to "run" vulkaninfo to create the file output + // So that we don't have to touch the C++ desktop code, we'll set the current working directory + // to the shared documents folder where we are allowed to create and store files + NSArray *docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *myPath = [docPath objectAtIndex:0]; + chdir([myPath UTF8String]); + + // HTML Version + const char *htmlArgs[2] = {"vulkaninfo", "--html"}; + vulkanInfoMain(2, (char **)htmlArgs); + + // JSON output + const char *jsonArgs[2] = {"vulkaninfo", "--json"}; + vulkanInfoMain(2, (char **)jsonArgs); + + const char *portArgs[2] = {"vulkaninfo", "--portability"}; + vulkanInfoMain(2, (char **)portArgs); + + NSString *appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/vulkaninfo/iOS/vulkaninfo/metal_iosview.h b/vulkaninfo/iOS/vulkaninfo/metal_iosview.h new file mode 100644 index 00000000..ebeacaf2 --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/metal_iosview.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2018-2020 The Khronos Group Inc. + * Copyright (c) 2018-2020 Valve Corporation + * Copyright (c) 2018-2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Jeremy Kniager + * Author: Richard Wright + */ + +#ifndef metal_iosview_h +#define metal_iosview_h + +void* CreateMetalView(uint32_t width, uint32_t height); + +void DestroyMetalView(void* view); + +void* GetCAMetalLayerFromMetalView(void* view); + +#endif /* metal_view_h */ diff --git a/vulkaninfo/iOS/vulkaninfo/metal_iosview.m b/vulkaninfo/iOS/vulkaninfo/metal_iosview.m new file mode 100644 index 00000000..df0d4f1f --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/metal_iosview.m @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018-2020 The Khronos Group Inc. + * Copyright (c) 2018-2020 Valve Corporation + * Copyright (c) 2018-2020 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Jeremy Kniager + * Author: Richard Wright + */ + +#import + +@interface NativeMetalView : UIView +@end + +@implementation NativeMetalView +- (id)init:(CGRect)frame { + self = [super initWithFrame:frame]; + return self; +} + ++ (Class)layerClass { + return [CAMetalLayer class]; +} + +- (CALayer*)makeBackingLayer { + CALayer* layer = [self.class.layerClass layer]; + // CGSize viewScale = [self convertSizeToBacking:CGSizeMake(1.0, 1.0)]; + // layer.contentsScale = MIN(viewScale.width, viewScale.height); + return layer; +} +@end + +NativeMetalView* CreateMetalView(uint32_t width, uint32_t height) { + return [[NativeMetalView alloc] initWithFrame:CGRectMake(0, 0, width, height)]; +} + +// void DestroyMetalView(void* view) { [(NativeMetalView*)view dealloc]; } + +CAMetalLayer* GetCAMetalLayerFromMetalView(NativeMetalView* view) { return (CAMetalLayer*)view.layer; } diff --git a/vulkaninfo/iOS/vulkaninfo/vulkaninfo.entitlements b/vulkaninfo/iOS/vulkaninfo/vulkaninfo.entitlements new file mode 100644 index 00000000..ee95ab7e --- /dev/null +++ b/vulkaninfo/iOS/vulkaninfo/vulkaninfo.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 99d5a628..3c7107bc 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -22,6 +22,7 @@ * Author: Jeremy Kniager * Author: Shannon McPherson * Author: Bob Ellison + * Author: Richard Wright * Author: Charles Giessen * */ @@ -976,8 +977,9 @@ int main(int argc, char **argv) { if (json_output) { std::string start_string = std::string("{\n\t\"$schema\": \"https://schema.khronos.org/vulkan/devsim_1_0_0.json#\",\n") + - "\t\"comments\": {\n\t\t\"desc\": \"JSON configuration file describing GPU " + std::to_string(selected_gpu) + - ". Generated using the vulkaninfo program.\",\n\t\t\"vulkanApiVersion\": \"" + + "\t\"comments\": {\n\t\t\"desc\": \"JSON configuration file describing GPU " + std::to_string(selected_gpu) + " (" + + gpus.at(selected_gpu)->props.deviceName + + "). Generated using the vulkaninfo program.\",\n\t\t\"vulkanApiVersion\": \"" + VkVersionString(instance.vk_version) + "\"\n" + "\t}"; #ifdef VK_USE_PLATFORM_IOS_MVK json_out = std::ofstream("vulkaninfo.json"); @@ -999,7 +1001,8 @@ int main(int argc, char **argv) { "{\n\t\"$schema\": " "\"https://schema.khronos.org/vulkan/devsim_VK_KHR_portability_subset-provisional-1.json#\",\n") + "\t\"comments\": {\n\t\t\"desc\": \"JSON configuration file describing GPU " + std::to_string(selected_gpu) + - "'s portability features and properties. Generated using the vulkaninfo program.\",\n\t\t\"vulkanApiVersion\": " + "'s (" + gpus.at(selected_gpu)->props.deviceName + + "( portability features and properties. Generated using the vulkaninfo program.\",\n\t\t\"vulkanApiVersion\": " "\"" + VkVersionString(instance.vk_version) + "\"\n" + "\t}"; #ifdef VK_USE_PLATFORM_IOS_MVK -- cgit v1.2.3