Post

Replies

Boosts

Views

Activity

Reply to Metal performance compared to OpenCL
device const sphericalparams * params [[buffer(2)]] --- Metal ... xyout[index].x = params->x + params->scale * x; xy_out[index].y = params->y + params->scale * y; vs float scale, float x0, float y0 --- OpenCL xyout[i].even = x0 + scale * x; xyout[i].odd = y0 + scale * y; The compiler code optimizer most likely likes the OpenCL approach. The params -> indirection may be costly.
Nov ’20
Reply to Big Sur OpenCL changes on AMD GPUs
Based on the info you have posted, this is a LuxRays bug. The referenced file is one of their own internal source files. I am the author of Fractal Architect for Mac and iOS. I am not having any issues with my own app. In fact, it looks like Apple has fixed issues I reported back in Catalina. I have had an OpenCL app on MacOS since 2009. And yes OpenCL has been broken 5 years ago when El Capitan was released, but since then it has been robust for single GPU renders. OpenCL has been problematic for multiple GPU rendering, whereas Metal works properly. I have not yet retested the multiple GPU kernel scheduling bug in Big Sur.
Nov ’20
Reply to iOS 13.4 Beta 4 - crash
I have same crash. In my case, the UIToolbar is crashing the app, laying out its internal items.Radar # FB7654080iOS 13.4 UIToolbar crashes app inside call to _layoutBar() ========This bug only occurs in iOS 13.4. It does not iOS 13.3 and earlier. Verified in Simulator.Because this bug makes the app unusable, the app has been Removed from Sale on the App store.This crash occurs when the user clicks on a Tab button to switch to a different Tab view. If that Tab view has a toolbar, with several operating modes, where its toolbar item sets have to be swapped out by viewWillAppear(), the app will crash.The crash occurs while UIKit is laying out all the subviews in the upcoming Tab view. This is all 100% Apple code. My own functions are not in the crash callback list.It is 100% repeatable, but sometimes it takes several attempts. For instance, my app has these 2 tabs (among others): File and Favorites.If the user has a document open in the Files tab and then switches back and forth to Favorites, then back to File tab, ....It takes 2 or 3 repeats of tab switching to cause the crash.It looks like UIKit is holding on to the prior count of UIToolbarItems, which does not match the "actual" number of items. And then it inserts items into an out-of-bounds index. CRASH !So the fix is simple, UIButtonBar._layoutBar() needs to check the actual upper bound index before the insertion.*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'index out of bounds for arranged subview: index = 5 expected to be less than or equal to 4'*** First throw call stack:(0 CoreFoundation 0x00007fff23e3dcce __exceptionPreprocess + 3501 libobjc.A.dylib 0x00007fff50b3b9b2 objc_exception_throw + 482 CoreFoundation 0x00007fff23e3db0c +[NSException raise:format:] + 1883 UIKitCore 0x00007fff4901e07c -[UIStackView insertArrangedSubview:atIndex:] + 1614 UIKitCore 0x00007fff482123d3 -[_UIButtonBar _layoutBar] + 34615 UIKitCore 0x00007fff48215ce8 -[_UIButtonBarStackView updateConstraints] + 486 UIKitCore 0x00007fff49038bce -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 4897 UIKitCore 0x00007fff4903919c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 11878 UIKitCore 0x00007fff49039036 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 8299 Foundation 0x00007fff25a99334 -[NSISEngine withBehaviors:performModifications:] + 8410 UIKitCore 0x00007fff4903993e __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 8511 UIKitCore 0x00007fff4903814b -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 10412 UIKitCore 0x00007fff49039499 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 15413 UIKitCore 0x00007fff4903a3b8 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 39314 UIKitCore 0x00007fff49105e61 -[UIView(Hierarchy) layoutBelowIfNeeded] + 133415 UIKitCore 0x00007fff4821b76e -[_UIButtonBarButtonVisualProviderIOS _configureImageOrTitleFromBarButtonItem:compact:] + 97716 UIKitCore 0x00007fff4821e903 -[_UIButtonBarButtonVisualProviderIOS configureButton:fromBarButtonItem:] + 39717 UIKitCore 0x00007fff4821c7eb -[_UIButtonBarButtonVisualProviderIOS configureButton:withAppearanceDelegate:fromBarItem:] + 11418 UIKitCore 0x00007fff482172d9 -[_UIButtonBarButton _configureFromBarItem:appearanceDelegate:isBackButton:] + 8319 UIKitCore 0x00007fff48216e75 -[_UIButtonBarButton configureFromBarItem:withAppearanceDelegate:] + 5320 UIKitCore 0x00007fff48213417 -[_UIButtonBar _updatedViewForBarButtonItem:withView:] + 45621 UIKitCore 0x00007fff48211614 __32-[_UIButtonBar _newGroupLayout:]_block_invoke + 8222 UIKitCore 0x00007fff48221066 -[_UIButtonBarItemLayout _updateItemView] + 5323 UIKitCore 0x00007fff48221647 -[_UIButtonBarItemLayout _configure] + 3924 UIKitCore 0x00007fff48220103 -[_UIButtonBarLayout configure] + 5125 UIKitCore 0x00007fff48220266 -[_UIButtonBarLayout addLayoutViews:] + 4926 UIKitCore 0x00007fff48223731 -[_UIButtonBarItemGroupLayout _iterateConfiguredLayouts:] + 22827 UIKitCore 0x00007fff4822380d -[_UIButtonBarItemGroupLayout _addLayoutViews:] + 11128 UIKitCore 0x00007fff482201ca -[_UIButtonBarLayout addLayoutViews:layoutGuides:constraintsToActivate:constraintsToDeactivate:] + 11129 UIKitCore 0x00007fff48211d36 -[_UIButtonBar _layoutBar] + 176830 UIKitCore 0x00007fff48215ce8 -[_UIButtonBarStackView updateConstraints] + 4831 UIKitCore 0x00007fff49038bce -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 48932 UIKitCore 0x00007fff4903919c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 118733 UIKitCore 0x00007fff49039036 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 82934 Foundation 0x00007fff25a99334 -[NSISEngine withBehaviors:performModifications:] + 8435 UIKitCore 0x00007fff490393b2 -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 11236 UIKitCore 0x00007fff49039036 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 82937 UIKitCore 0x00007fff49039036 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 82938 Foundation 0x00007fff25a99334 -[NSISEngine withBehaviors:performModifications:] + 8439 UIKitCore 0x00007fff4903993e __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 8540 UIKitCore 0x00007fff4903814b -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 10441 UIKitCore 0x00007fff49039499 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 15442 UIKitCore 0x00007fff4903a3b8 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 39343 UIKitCore 0x00007fff49105e61 -[UIView(Hierarchy) layoutBelowIfNeeded] + 133444 UIKitCore 0x00007fff484c336d -[UINavigationController _positionNavigationBarHidden:edge:initialOffset:] + 88045 UIKitCore 0x00007fff484c35f7 -[UINavigationController _positionNavigationBarHidden:edge:] + 39446 UIKitCore 0x00007fff484cdb68 -[UINavigationController _updateBarsForCurrentInterfaceOrientationAndForceBarLayout:] + 14547 UIKitCore 0x00007fff485788e4 -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 21848 UIKitCore 0x00007fff484caac2 -[UINavigationController viewDidMoveToWindow:shouldAppearOrDisappear:] + 6949 UIKitCore 0x00007fff4911110e -[UIView(Internal) _didMoveFromWindow:toWindow:] + 141050 UIKitCore 0x00007fff49110e5c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 72051 UIKitCore 0x00007fff49110e5c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 72052 UIKitCore 0x00007fff49110e5c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 72053 UIKitCore 0x00007fff49104789 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 13054 UIKitCore 0x00007fff4910468e -[UIView(Hierarchy) _postMovedFromSuperview:] + 80055 UIKitCore 0x00007fff49113c24 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 171856 UIKitCore 0x00007fff490d4a45 -[UITransitionView transition:fromView:toView:removeFromView:] + 137357 UIKitCore 0x00007fff490d44d0 -[UITransitionView transition:fromView:toView:] + 6358 UIKitCore 0x00007fff490d4213 -[UITransitionView transition:toView:] + 15559 UIKitCore 0x00007fff484a8769 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 166160 UIKitCore 0x00007fff484a7828 -[UITabBarController transitionFromViewController:toViewController:] + 5961 UIKitCore 0x00007fff484a3cfb -[UITabBarController _setSelectedViewController:] + 42662 UIKitCore 0x00007fff484a3b17 -[UITabBarController setSelectedViewController:] + 10963 UIKitCore 0x00007fff484a777d -[UITabBarController _tabBarItemClicked:] + 60264 UIKitCore 0x00007fff48c1a4d5 -[UIApplication sendAction:to:from:forEvent:] + 8365 UIKitCore 0x00007fff482f0147 -[UITabBar _sendAction:withEvent:] + 55766 UIKitCore 0x00007fff48c1a4d5 -[UIApplication sendAction:to:from:forEvent:] + 8367 UIKitCore 0x00007fff485cbc83 -[UIControl sendAction:to:forEvent:] + 22368 UIKitCore 0x00007fff485cbfcb -[UIControl _sendActionsForEvents:withEvent:] + 39669 UIKitCore 0x00007fff482f2b7d -[UITabBar _buttonUp:] + 11370 UIKitCore 0x00007fff48c1a4d5 -[UIApplication sendAction:to:from:forEvent:] + 8371 UIKitCore 0x00007fff485cbc83 -[UIControl sendAction:to:forEvent:] + 22372 UIKitCore 0x00007fff485cbfcb -[UIControl _sendActionsForEvents:withEvent:] + 39673 UIKitCore 0x00007fff485caf3c -[UIControl touchesEnded:withEvent:] + 49774 UIKitCore 0x00007fff48c55d10 -[UIWindow _sendTouchesForEvent:] + 135975 UIKitCore 0x00007fff48c57a95 -[UIWindow sendEvent:] + 450176 UIKitCore 0x00007fff48c31ed9 -[UIApplication sendEvent:] + 35677 UIKitCore 0x00007fff48cbc336 __dispatchPreprocessedEventFromEventQueue + 732878 UIKitCore 0x00007fff48cbf502 __handleEventQueueInternal + 656579 UIKitCore 0x00007fff48cb606b __handleHIDEventFetcherDrain + 8880 CoreFoundation 0x00007fff23da1c71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 1781 CoreFoundation 0x00007fff23da1b9c __CFRunLoopDoSource0 + 7682 CoreFoundation 0x00007fff23da1374 __CFRunLoopDoSources0 + 18083 CoreFoundation 0x00007fff23d9bf6e __CFRunLoopRun + 97484 CoreFoundation 0x00007fff23d9b884 CFRunLoopRunSpecific + 40485 GraphicsServices 0x00007fff38b5ac1a GSEventRunModal + 13986 UIKitCore 0x00007fff48c19220 UIApplicationMain + 160587 Fractical Architect iOS 0x000000010ff4c4b5 main + 85
Apr ’20
Reply to OpenGLES is deprecated and is not available when building for Mac Catalyst.
OpenGL ES has never been supported on Mac OS. With OpenGL being deprecated, I guess Apple did not want to spend time providing runtime support for OpenGL ES on top of Mac OS.Its a big bother porting your app from OpenGL to Metal. At least they are similar in many ways conceptually.I don't know what type of app you have, but if you are using a 3rd party engine, they might have done most of the conversion for you.Otherwise, if you are not strong in Computer Graphics, this could be a real problem.
Dec ’19
Reply to Developer relations?
Hi, my app, Fractal Architect, has been a showcase for the immense power of Metal/OpenCL/CUDA GPU compute shadersfor the last 10 years on MacOS and the app's render engine is in use on Windows as well (OpenCL/CUDA). The app is now in Beta on iOS/iPadOS with Metal as well.So I know exactly what you are going through.Apple's infamous "Wall of Secrecy" means that I have never had an internal contact inside of Apple.I have been directly contacted by AMD, but their hands are tied with their working relationship with Apple.Oddly enough, my testing partner for Fractal Architect, is Lennart Ostman from Harnosand, Sweden. It is a small, small world.I am in the USA. I see that your company is based out of Sweden.Observations:The pattern on Mac OS is that Metal/OpenCL is stable for 2-3 years, followed by 6-9 months of driver ****. This pattern has repeated several times.Metal is far better supported on iOS/iPadOS. My app's large and very complex compute shaders ported easily to iOS 12/13.I was really surprised by how robust Metal has been on iOS.Catalina has been frankly extremely buggy. But for my app Metal on Catalina has not been problematic. I did have to workaround a couple of serious Catalina OpenCL/Metal bugs.My app also uses classic vertex and fragment shaders on both Metal and OpenGL. I am using them for both 2D and 3D model visualization.We should make contact off this forum. We might be able to help each other out.
Dec ’19
Reply to XPC Services cannot open/read files in Catalina
One more thing:XPC services are a great. In the past, they worked extremely well.They were very easy to work with in Xcode. The ability to debug both sides, the host app and the XPC service, at the same time in Xcode is marvelous.In production, with my app, on High Sierra and Mojave, using the XPC service to isolate a big memory leak worked so extremely well.Please don't nerf sandboxed XPC services. It is one of the best examples of quality engineering in Apple's arsenal.If there has been architetural design change for XPC, please make sure that they have some way to share files/folders with their host apps.
Dec ’19
Reply to XPC Services cannot open/read files in Catalina
I have checked the Entitlements Reference.Apparently the last revision dates back to 2017-03-27. So no design change for Catalina in all of this.The "App Sandbox in Depth" article referenced by the "Entitlements Reference": Its last revision is 2016-09-13But XPC service file access works perfectly in High Sierra and Mojave, but not in Catalina.With zero published design change, this XPC service's inability to open a URL designated by the host app in Catalinacan only be construed as a serious, devastating bug.The original implementation worked correctly. Catalina's implementation does not.
Dec ’19