Post

Replies

Boosts

Views

Activity

iOS Metal sampling texture3d problem
I want to implement a HDR filter, and then use 3D slicing image to sampling from original texture. It worked well on Mac, but get wrong result on iPhone. It seems to have problems in sampling texture3d<float>, either texture3d<half>, I don't know what to do now. I modified Apple's sample code "Creating and Sampling Textures". And I pushed my code to GitHub,MyGitRepo->After modified about apple sample code. By shader-debugger, I found iOS get wrong result at 'texture3d-sample', even if I replace with texture3d<half> ,still wrong.
2
0
1.1k
Feb ’22
Metal performance lower than openGL when using MSAA,why
I have an multiple render-backend application on MacOS,so I can compare the performance between Metal and OpenGL about OffscreenRender. I found that, when I do not use MSAA,metal perform better.But when I open MSAA,especially at Large-texture,such as 3840x1920, metal seems slower. Then I simplify the render-pass, no draw call, seems it's the clear of texture was the difference of Metal and OpenGL, I'm not sure. in OpenGL,I use glClearBufferfv; in Metal, I set colorAttachments.loadAction=MTLLoadActionClear(I tried enalbe or disable tripple-buffering); Then I close the clear-action both on OpenGL and Metal,render-pass time of openGL reduce about 3ms ,Metal reduce about 8ms, Is that mean Metal take more time to clear texture? How can I resolve with such problem? (because I need clear-action) @Apple Device: Mac-mini-2018 Xcode: Xcode13.0 Here is the metal instrument screen-shot(idle of GPU seems too long,about 50ms):
0
1
871
Nov ’21
On Xcode13.0,my Metal-app successfully run on independent or in Xcode-Instrument, but crash on debugging,why?
I have an App,use Metal-api, it worked well at Xcode12, but when I upgrade Xcode13.0,things changed, it always crash at newFunctionWithName. How do I get my metal library: My app is multiple-render-backend, so my shader is .glsl, use glslangValidator turn it to .metal get metallib,refrence : Building a Library with Metal's Command-Line Tools, use dispatch_data_create to load metallib, and call newLibraryWithData to get MTLLibrary, then call newFunctionWithNameto get MTLFunction , crash here. Because it's my company's code,so SORRY, I can't share the code or screenshot. The same code, worked on Xcode11 and Xcode12,but crash at Xcode13.0 when use Xcode to debug. Xcode13.0: crash at debug, but successfully run on independent or in Xcode-Instrument. I have no clue, what should I do to solve this problem on Xcode13.0, or it's the bug on Xcode13.0? @Apple ps: (that problem above occurred on x86_64-mac,macOS 11.5)
4
0
2.2k
Nov ’21
Run/Debug iOS-app on M1-Mac with Xcode12.5, very very slow ,unbelievable !
Device : apple m1 Mac-mini Xcode : 12.5 Debug Task: I have developer-id ,so I can run iOS-App on Mac,not iPhone. When I run on Mac-mini, device chose (My Mac(Designed for iPad)), it is unbelievable slow, I wait about 10 minutes, it still stuck on launching, and not start. When I run on iPhone 11, it just cost 40 seconds(I know it is also slow, but acceptable ). My guess: I use Xcode Marco DYLD_PRINT_STATISTICS_DETAILS to analyze start-time , it turns out to be that it spend a lot of time on "rebase ,binding " and "total debugger pause time". I wonder if or not because of that  I target_link_libraries too many frameworks(about 9). I have no. clue now ,  Is there anyone  encountered this problem and solved, please give me some advices ,Thank you  so. much  !!!!! (By the way , my iOS-app bundle size is about 205M ) Here is the screenshot:
3
0
2.9k
Jun ’21