From 758a96f329c1f7dcc1ec6bd289022545c3a7981c Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Mon, 19 Sep 2016 14:02:58 -0600 Subject: layer: Add in-use validation for imageView Bind imageView from a descriptor to the command buffer at CmdBindDescriptorSets time and check for an in-use imageView at DestroyImageView time. Also use new AddCommandBufferBindingImageView() helper to bind children of framebuffer in AddFrameBufferBinding(). --- layers/descriptor_sets.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index df5dac29..f02da6b1 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -880,9 +880,7 @@ void cvdescriptorset::ImageSamplerDescriptor::BindCommandBuffer(const core_valid // Add binding for image auto iv_state = getImageViewState(dev_data, image_view_); if (iv_state) { - auto image_node = getImageNode(dev_data, iv_state->create_info.image); - if (image_node) - core_validation::AddCommandBufferBindingImage(dev_data, cb_node, image_node); + core_validation::AddCommandBufferBindingImageView(dev_data, cb_node, iv_state); } } @@ -913,9 +911,7 @@ void cvdescriptorset::ImageDescriptor::BindCommandBuffer(const core_validation:: // Add binding for image auto iv_state = getImageViewState(dev_data, image_view_); if (iv_state) { - auto image_node = getImageNode(dev_data, iv_state->create_info.image); - if (image_node) - core_validation::AddCommandBufferBindingImage(dev_data, cb_node, image_node); + core_validation::AddCommandBufferBindingImageView(dev_data, cb_node, iv_state); } } -- cgit v1.2.3