Bill Hollings 92712e240a Fix memory leak of dummy MTLTexture in render subpasses that use no attachments.
Older Metal does not support rendering without subpass attachments.
In this case, a dummy attachment with a dummy MTLTexture is created
whenever the subpass begins, but was not being correctly used.

Move the creation, retaining, and releasing of the dummy MTLTexture to
MVKFramebuffer, where the extent and layer count is known and can be reused.

Pass framebuffer to MVKCommandEncoder::beginRenderpass() and remember
current framebuffer in MVKCommandEncoder.
Add getFramebufferExtent() and getFramebufferLayerCount() to MVKCommandEncoder.
Pass framebuffer to MVKRenderSubpass:populateMTLRenderPassDescriptor() and
retrieve dummy MTLTexture from framebuffer.
2021-12-25 16:18:18 -05:00
..