Post

Replies

Boosts

Views

Activity

Comment on On Xcode13.0,my Metal-app successfully run on independent or in Xcode-Instrument, but crash on debugging,why?
Hello David: I have confirmed, your workaround solution worked for me , then it won't crash when debug via Xcode13.0! Unluckly,my leader hopes me to find the truly reason, because we manage project through CMake,it won't be convenient that click Xcode-option every time.But, thanks for your help so much anyway! So, I spent whole day to narrow down the real issue, **finally, I found the real problem** is the command param of generating metallib file. Xcode13.0 deprecate the option '-MO',if I keep this option, the crash will come. By the way , I found another thing,Apple says that Xcode13.0 add a new option "-frecord-sources", it also crash, I don't know why, so I didn't use it. you can search "MO" in this web page for more information: Generating and Loading a Metal Library Symbol File (ps: Markdown grammar doesn't work?emm..) Best wishes, Benjamin
Nov ’21
Comment on On Xcode13.0,my Metal-app successfully run on independent or in Xcode-Instrument, but crash on debugging,why?
Hello, apple engineer: Firstly, thanks for your reply. I solved this problem yesterday, the truly reason is the command param "-MO" of "xcrun -sdk macosx metallib", it's deprecated since Xcode13.0(this isn't stated in release note,luckly in document of metal-lib). The details you can see above that I replied to David(user-account r2d3). I wanna describe the detailed situation that I have went through, maybe can help others: when I keep "-MO" like before, and then use Xcode13.0 to debug/release my Application, it crashed at newFunctionWithName, with error tip" EXC_BAD_ACCESS (code=2, address=0x700001d9fff8)",the address can be different every time. When I run application not via Xcode, such as via double click, or viaMetal Instrument, it won't crash. Lastly, I still have two question, I still don't know the meaning of "-MO", and why "-frecord-sources"still cause crash. Best wishes, @apple
Nov ’21
Comment on iOS Metal sampling texture3d problem
Hi,I want to get the right HDR-image,but iOS get the image with obviously square color block upon right image. In fact , I finally found the key reason and solve the problem by myself: iOS can't support texture-sample for RGBA32Float format . in Metal ,it's MTLPixelFormatRGBA32Float , to solve this problem ,should use MTLPixelFormatRGBA16Float in instead. Part of my code below:     texDesc.textureType  = MTLTextureType3D;     texDesc.pixelFormat  = MTLPixelFormatRGBA16Float; In Metal shader, sampling with texture3d<half>. In addition, transform my origin float-array data to float-16bit data; ==> use float16_from_float32. Then send data to my MTLTexture with "- (void)replaceRegion: ..." . Ps: That's all, I hope it will help others who encounter this problem.
Topic: App & System Services SubTopic: Core OS Tags:
Feb ’22
Comment on On Xcode13.0,my Metal-app successfully run on independent or in Xcode-Instrument, but crash on debugging,why?
Hello David: I have confirmed, your workaround solution worked for me , then it won't crash when debug via Xcode13.0! Unluckly,my leader hopes me to find the truly reason, because we manage project through CMake,it won't be convenient that click Xcode-option every time.But, thanks for your help so much anyway! So, I spent whole day to narrow down the real issue, **finally, I found the real problem** is the command param of generating metallib file. Xcode13.0 deprecate the option '-MO',if I keep this option, the crash will come. By the way , I found another thing,Apple says that Xcode13.0 add a new option "-frecord-sources", it also crash, I don't know why, so I didn't use it. you can search "MO" in this web page for more information: Generating and Loading a Metal Library Symbol File (ps: Markdown grammar doesn't work?emm..) Best wishes, Benjamin
Replies
Boosts
Views
Activity
Nov ’21
Comment on On Xcode13.0,my Metal-app successfully run on independent or in Xcode-Instrument, but crash on debugging,why?
Hello, apple engineer: Firstly, thanks for your reply. I solved this problem yesterday, the truly reason is the command param "-MO" of "xcrun -sdk macosx metallib", it's deprecated since Xcode13.0(this isn't stated in release note,luckly in document of metal-lib). The details you can see above that I replied to David(user-account r2d3). I wanna describe the detailed situation that I have went through, maybe can help others: when I keep "-MO" like before, and then use Xcode13.0 to debug/release my Application, it crashed at newFunctionWithName, with error tip" EXC_BAD_ACCESS (code=2, address=0x700001d9fff8)",the address can be different every time. When I run application not via Xcode, such as via double click, or viaMetal Instrument, it won't crash. Lastly, I still have two question, I still don't know the meaning of "-MO", and why "-frecord-sources"still cause crash. Best wishes, @apple
Replies
Boosts
Views
Activity
Nov ’21
Comment on On Xcode13.0,my Metal-app successfully run on independent or in Xcode-Instrument, but crash on debugging,why?
oh, I want to choose you as finally answer, but I click mistakenly.....
Replies
Boosts
Views
Activity
Nov ’21
Comment on On Xcode13.0,my Metal-app successfully run on independent or in Xcode-Instrument, but crash on debugging,why?
I run "xcrun -sdk macosx metal --help  | grep MO", and get "Embed sources and driver options into output",what does it mean?
Replies
Boosts
Views
Activity
Nov ’21
Comment on iOS Metal sampling texture3d problem
Hi,I want to get the right HDR-image,but iOS get the image with obviously square color block upon right image. In fact , I finally found the key reason and solve the problem by myself: iOS can't support texture-sample for RGBA32Float format . in Metal ,it's MTLPixelFormatRGBA32Float , to solve this problem ,should use MTLPixelFormatRGBA16Float in instead. Part of my code below:     texDesc.textureType  = MTLTextureType3D;     texDesc.pixelFormat  = MTLPixelFormatRGBA16Float; In Metal shader, sampling with texture3d<half>. In addition, transform my origin float-array data to float-16bit data; ==> use float16_from_float32. Then send data to my MTLTexture with "- (void)replaceRegion: ..." . Ps: That's all, I hope it will help others who encounter this problem.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’22