le-foot
Forum Replies Created
-
AuthorPosts
-
No, I’ve left the glDeleteShader() calls commented out. It runs fine on OpenGL; I would imagine if a shader program is deleted unexpectedly, it would also crash if I’m not using MetalGL?
Hi Bill, yes I’ve upgraded to the latest MetalGL. It never drew before, but now it draws for a little while.
Nothing appears in the logs, and location value 0 should be ok. I will investigate further. In another render task, it often crashes after about 10 seconds with this error:
[***MetalGL ERROR***] GL_INVALID_VALUE. glDrawArrays(): Shader program 2 does not exist
Do you know what this means?
Hi Bill,
Things are looking great! However, one issue has come up – after drawing one frame, I have a call to glUniformMatrix4fv:
glUniformMatrix4fv( location, count, GL_FALSE, ( m_bufferData ) );
values are:
location: 0 count: 2 m_bufferData: -1.509
The call to “mglUniformMatrix4fv()” results in a crash: EXC_BAD_ACCESS (code=1, address=0x1475c310). Does that mean anything to you?
Hi Bill,
I do have an iOS 8 device, and I still couldn’t get it to work. I have the following error when running Apple’s sample code:
[***MetalGL ERROR***] GL_INVALID_OPERATION. glGetUniformLocation(): Shader program 0 has not been linked. 2015-09-16 12:39:39.095 GLEssentials[1639:916118] No modelViewProjectionMatrix in character shader 2015-09-16 12:39:39.096 GLEssentials[1639:916118] GLError GL_INVALID_OPERATION set in File:/Users/macuser/Downloads/GLEssentials/GLEssentials/Source/Classes/OpenGLRenderer.m Line:436 2015-09-16 12:39:39.108 GLEssentials[1639:916118] Vtx Shader compile log:The OpenGL GLSL shader source code could not be converted to Metal shader source code because the MetalGL Shader Converter has not been linked to this build. Shader source was not provided.
Hi Bill,
I’m running it through Xcode’s debugger, and I found that the error is actually the same as the Apple Sample code thread:
[mgl-info] Changed size of renderbuffer 1 to (1407, 1536) /BuildRoot/Library/Caches/com.apple.xbs/Sources/Metal/Metal-54.30/Framework/MTLRenderPipeline.mm:1061: failed assertion 'No valid pixelFormats set.'
The stack is:
#4 0x00000001887a3494 in MTLReportFailure () #5 0x00000001887a2a88 in -[MTLRenderPipelineDescriptorInternal validateWithDevice:] () #6 0x0000000102de4120 in ___lldb_unnamed_function215$$AGXMetalG3 () #7 0x0000000192018ac4 in -[MTLDebugDevice _newRenderPipelineStateWithDescriptor:options:reflection:error:] () #8 0x0000000192018c28 in -[MTLDebugDevice newRenderPipelineStateWithDescriptor:options:reflection:error:] () #9 0x0000000100195294 in -[MGLRenderPipelineState makeMTLPipelineState] at /Users/bill/Documents/Dev/iOSProjects/MetalGL/MetalGL/MetalGL/MetalGL/GPUState/MGLRenderPipelineState.m:178
Hi Bill,
I commented
glDeleteShader()
out, but got the following error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/Metal/Metal-54.30/Framework/MTLRenderPipeline.mm:1061: failed assertion 'No valid pixelFormats set.'
Hi Bill,
Thanks for following up – unfortunately I’m working with proprietary and licenced source code with my test app and I’m unable to freely release the project source code.
This was in the console:
Sep 14 12:29:33 testiPad diagnosticd[81] <Error>: error evaluating process info - pid: 1625, puniqueid: 1625 Sep 14 12:29:33 testiPad com.apple.xpc.launchd[1] (UIKitApplication:com.MetalGLTestApp[0xf895][1625]) <Notice>: Service exited due to signal: Abort trap: 6 Sep 14 12:29:33 testiPad SpringBoard[1270] <Warning>: Application 'UIKitApplication:com.MetalGLTestApp[0xf895]' crashed. Sep 14 12:29:33 testiPad UserEventAgent[23] <Warning>: 10830873922631: id=com.MetalGLTestApp pid=1625, state=0 Sep 14 12:29:33 testiPad ReportCrash[1626] <Notice>: Formulating report for corpse[1625] MetalGLTestApp Sep 14 12:29:33 testiPad ReportCrash[1626] <Warning>: saved type '109_MetalGLTestApp' report (3 of max 25) as /var/mobile/Library/Logs/CrashReporter/MetalGLTestApp_2015-09-14-122933_testiPad.ips
That fixed it! I missed a project. Thank you!
However, I seem to have a new problem: the app crashes with the following stack:
Thread 0 Crashed: 0 libsystem_kernel.dylib 0x000000019ab131e0 0x19aaf8000 + 111072 1 libsystem_pthread.dylib 0x000000019abdcf0c 0x19abd8000 + 20236 2 libsystem_c.dylib 0x000000019aa86b78 0x19aa24000 + 404344 3 libsystem_c.dylib 0x000000019aa5bb28 0x19aa24000 + 228136 4 Metal 0x00000001887a3494 0x18877c000 + 160916 5 Metal 0x00000001887a2a88 0x18877c000 + 158344 6 AGXMetalG3 0x0000000102b6c120 0x102b5c000 + 65824 7 MetalGLTestApp 0x0000000100201294 0x1000cc000 + 1266324
Xcode stack with symbols:
#0 0x000000019ab131e0 in __pthread_kill () #1 0x000000019abdcf0c in pthread_kill () #2 0x000000019aa86b78 in abort () #3 0x000000019aa5bb28 in __assert_rtn () #4 0x00000001887a3494 in MTLReportFailure () #5 0x00000001887a2a88 in -[MTLRenderPipelineDescriptorInternal validateWithDevice:] () #6 0x0000000102b6c120 in ___lldb_unnamed_function215$$AGXMetalG3 () #7 0x000000010020d294 in -[MGLRenderPipelineState makeMTLPipelineState] at /Users/bill/Documents/Dev/iOSProjects/MetalGL/MetalGL/MetalGL/MetalGL/GPUState/MGLRenderPipelineState.m:178 #8 0x0000000100335220 in MetalGLTestApp::PrepareShaders() at /Volumes/AppleSrc/MetalGLTestApp.cpp:134
You’re right:
GetSystemContext()
only returns an instance of EAGLContext. Any chance you might know if I missed a step setting this up?Thank you for your replies!
Hi Bill,
I’m not seeing any error message in the console logs. This is the function call that I have, and as you can see from the above, layer is CAMetalLayer:
[GetSystemContext() renderbufferStorage: GL_RENDERBUFFER fromDrawable: layer];
If I’m not using MetalGL, then this doesn’t occur.
Thanks!
Thanks for your reply, Bill. My this is my view:
m_view <EAGLView: 0x145e79170; frame = (0 0; 703.5 768); autoresize = W+H; layer = <CAMetalLayer: 0x145e798f0>>
Seems like it has a CAMetalLayer.
-
AuthorPosts