title: Metal Shader Debugging - Capture GPU Frame
body: <p>I want to debug my metal shader, tho the "Capture GPU Frame" button is not visible and unavailable in the debug menu.</p>
  
  <p>My scheme was initially set up like this:</p>
  
  <ul>
  <li>Capture GPU Frame: <em>Automatically Enabled</em></li>
  <li>Metal API Validation: <em>Enabled</em></li>
  </ul>
  
  <p>Tho when I change the Capture GPU Frame option to <em>Metal</em>, I do see the capture button, tho my app crashes when I'm trying to make the render command encoder:</p>
  
  <pre><code>commandBuffer.makeRenderCommandEncoder(descriptor: ...)
  </code></pre>
  
  <blockquote>
    <p>validateRenderPassDescriptor:644: failed assertion `Texture at colorAttachment[0] has usage (0x01) which doesn't specify MTLTextureUsageRenderTarget (0x04)'</p>
  </blockquote>
  
  <p>Question one: Why do I need to specify the usage? (It works in <em>Automatically Enabled</em> mode)</p>
  
  <p>Question two: How do I specify the <code>MTLTextureUsageRenderTarget</code>?</p>
  
  <p>Running betas; Xcode 10 and iOS 12.</p>