Fix #142110: Vulkan: Only last planar probe is visible

When using multiple planar probes only the last one would
be visible. The other probes would use the world probe.

Reason is that the data of planar probes are stored in
layered textures. When updating planar probes framebuffers
are created with the correct layer attached.

Vulkan backend missed some code paths to clear a single layer
when clearing a framebuffer where the previous action had depth
write disabled. This PR adds the missing code path.

Pull Request: https://projects.blender.org/blender/blender/pulls/145170
This commit is contained in:
Jeroen Bakker
2025-08-26 14:18:47 +02:00
parent 3417401f0f
commit f82e89183e
4 changed files with 24 additions and 8 deletions

View File

@@ -230,12 +230,17 @@ class FrameBuffer {
scissor_set(scissor_rect);
}
blender::gpu::Texture *depth_tex() const
inline const GPUAttachment &depth_attachment() const
{
if (attachments_[GPU_FB_DEPTH_ATTACHMENT].tex) {
return attachments_[GPU_FB_DEPTH_ATTACHMENT].tex;
return attachments_[GPU_FB_DEPTH_ATTACHMENT];
}
return attachments_[GPU_FB_DEPTH_STENCIL_ATTACHMENT].tex;
return attachments_[GPU_FB_DEPTH_STENCIL_ATTACHMENT];
}
blender::gpu::Texture *depth_tex() const
{
return depth_attachment().tex;
};
blender::gpu::Texture *color_tex(int slot) const