Posts

Post not yet marked as solved
2 Replies
679 Views
I'm trying to debug some shaders that call functions that are in other files. (Specifically I have a ShadowTerm function that is used by many different shaders.) I can bring up the fragment shader in XCode's GPU debugging, but I don't see a way to step into my function ShadowTerm(). Is there a way to step into functions that are in other .metal files?
Posted Last updated
.
Post not yet marked as solved
1 Replies
885 Views
I've got an iOS application that renders a lot of geometry. (Lots of objects and in most cases multiple instances of those objects) The app was previously running using OpenGL ES 3.0. I'm just starting in my conversion but already I'm getting the following error:Execution of the command buffer was aborted due to an error during execution. Too much geometry to support memoryless render pass attachments. (IOAF code 13)Is there any way to have some idea of how much geometry is too much? If I continue to get this error, does that mean that I need to switch from a memoryless render pass to two render passes, the first one writing to system memory and the second reading from system memory to perform the lighting?Thanks for any insight anyone can give.
Posted Last updated
.
Post marked as solved
2 Replies
1.9k Views
I'm trying to set up my iOS application so that it has two view controllers, one a MTKView and the other a GLKView. In my main storyboard I have a top level View Controller Scene, that has two Container Views. The first Container View references a subclass of GLKViewController that I have created and when the app launches my GLKViewController's viewDidLoad gets called. (So that is good!) My second Container View references a subclass of UIViewController (which I've named MetalViewController) but when the app launches MetalViewController's viewDidLoad never gets called. (So that is my problem I'm trying to figure out!) In the storyboard editor if I click on Metal View Controller Scene the assistant editor switches to show the MetalViewController's viewDidLoad code. Also the identiy inspector shows my custom class MetalViewController. If I open the Metal View Controller Scene (by clicking on the small arrow head) immediately below I see Metal View Controller which I can select. When I do that, I see the same as when viewing the scene, ie the custom class is MetalViewController. Opening Metal View Controller and clicking on View, I see that my custom class is MTKView. In all of the above it looks to me like my MetalViewController class's code is assigned and that viewDidLoad should run. (I should also mentioned that I have tried control dragging my view controller from the storyboard to my code to connect them)All the above is similar to the Apple provided sample source code OpenGLMetalInteroperability which has both an OpenGL view controller and a metal view controller. Anyone have any idea why my viewDidLoad would not be called for my second view controller (the MetalViewController) but is called for my first view controller? And what do I need to do to have my second view controller's viewDidLoad called? (And subsequent draw calls)
Posted Last updated
.