| 37 | namespace |
| 38 | { |
| 39 | void releaseFramebuffer( |
| 40 | Device& device, |
| 41 | Slang::ComPtr<gfx::IFramebuffer>& framebuffer, |
| 42 | Fbo::Attachment& depthStencil, |
| 43 | std::vector<Fbo::Attachment>& colorAttachments |
| 44 | ) |
| 45 | { |
| 46 | if (!framebuffer) |
| 47 | { |
| 48 | return; |
| 49 | } |
| 50 | if (depthStencil.pTexture) |
| 51 | { |
| 52 | return; |
| 53 | } |
| 54 | for (auto& attachment : colorAttachments) |
| 55 | { |
| 56 | if (attachment.pTexture) |
| 57 | { |
| 58 | return; |
| 59 | } |
| 60 | } |
| 61 | device.releaseResource(framebuffer); |
| 62 | framebuffer.setNull(); |
| 63 | } |
| 64 | } // namespace |
| 65 | |
| 66 | static Fbo::DescCache& getGlobalDescCache() |
no test coverage detected