diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index cb26d3ce92c..fb890491a44 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -2997,16 +2997,10 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vectortexture_ids.size(); i++) { Texture *texture = texture_owner.getornull(framebuffer->texture_ids[i]); - VkClearAttachment clear_at; - clear_at.aspectMask = VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM; // Invalid value. - clear_at.colorAttachment = uint32_t(-1); // Invalid value. - clear_at.clearValue.depthStencil.stencil = uint32_t(-1); // Invalid value. + VkClearAttachment clear_at = {}; if (p_clear_color && texture->usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) { ERR_FAIL_INDEX(color_index, p_clear_colors.size()); //a bug @@ -5683,13 +5665,6 @@ void RenderingDeviceVulkan::_draw_list_insert_clear_region(DrawList *draw_list, } else { ERR_CONTINUE(true); } - - // Ensure VkClearAttachment has been initialized properly. - ERR_CONTINUE_MSG(clear_at.aspectMask == VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM || - clear_at.colorAttachment == uint32_t(-1) || - clear_at.clearValue.depthStencil.stencil == uint32_t(-1), - "Bug: VkClearAttachment not initialized properly."); - clear_attachments.push_back(clear_at); }