From 0bdbf3c2d36a556ab2aa9ccf27b62a6ef5d21016 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Thu, 28 Sep 2017 12:46:58 -0600 Subject: [PATCH] layers:Remove invalid renderPass binding There's no reason to create a binding between RP used in pipeline creation and the cmd buffer that pipeline is bound to. This can lead to a bug where CB is incorrectly invalidated if that RP is destroyed after pipeline is bound to CB. --- layers/core_validation.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 31e090f0..9671e5f7 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5198,14 +5198,6 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipe set_pipeline_state(pipe_state); skip |= validate_dual_src_blend_feature(dev_data, pipe_state); addCommandBufferBinding(&pipe_state->cb_bindings, {HandleToUint64(pipeline), kVulkanObjectTypePipeline}, cb_state); - if (VK_PIPELINE_BIND_POINT_GRAPHICS == pipelineBindPoint) { - // Add binding for child renderpass - auto rp_state = GetRenderPassState(dev_data, pipe_state->rp_state->renderPass); - if (rp_state) { - addCommandBufferBinding(&rp_state->cb_bindings, {HandleToUint64(rp_state->renderPass), kVulkanObjectTypeRenderPass}, - cb_state); - } - } } lock.unlock(); if (!skip) dev_data->dispatch_table.CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); -- 2.34.1