Commit 9b1d271
committed
Guard framebufferTexture2D against a not-yet-allocated attachment image
VkGlFramebuffer.framebufferTexture2D unconditionally attaches the target
texture's backing VulkanImage, but a texture can legitimately be attached
to an FBO before its storage has been allocated (real GL leaves the FBO
incomplete until then). setAttachmentTexture only null-checks the
VkGlTexture, not its VulkanImage, so setAttachmentImage throws
"NullPointerException: Image is null" — crashing e.g. Xaero's
ImprovedFramebuffer.
Skip the attach/create/beginRendering when the texture is missing or its
image is not yet allocated, mirroring the leniency already applied in the
sibling framebufferRenderbuffer.1 parent 18b37c3 commit 9b1d271
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
| |||
0 commit comments