vk_rasterizer: Fully initialize clear value of depth attachment (#4473)

Prevents redundant renderpass breaks from render state mismatching due to stale values being left in the array
This commit is contained in:
TheTurtle 2026-05-25 02:24:48 +03:00 committed by GitHub
parent c0d35332af
commit 5be4fb8584
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -917,6 +917,7 @@ RenderState Rasterizer::BeginRendering(const GraphicsPipeline* pipeline) {
auto& attachment = state.depth_stencil_attachment;
attachment.image_view = *image_view.image_view;
attachment.image_layout = image.backing->state.layout;
attachment.clear_value = {};
if (regs.depth_buffer.DepthValid()) {
attachment.clear_value[0] = is_depth_clear ? std::bit_cast<u32>(regs.depth_clear) : 0u;