From 2dbc2668169e3aa0920615f3d9078a904827ee25 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Thu, 26 Jan 2017 12:16:30 -0700 Subject: repo: Clang-format c/cpp/h LVL files using LLVM Bring all source files in the repo up to date with consistent coding style/standard. Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23 --- layers/descriptor_sets.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 6d7ef553..6ad8dc02 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -362,16 +362,14 @@ cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const V } } -cvdescriptorset::DescriptorSet::~DescriptorSet() { - InvalidateBoundCmdBuffers(); -} - +cvdescriptorset::DescriptorSet::~DescriptorSet() { InvalidateBoundCmdBuffers(); } static std::string string_descriptor_req_view_type(descriptor_req req) { std::string result(""); for (unsigned i = 0; i <= VK_IMAGE_VIEW_TYPE_END_RANGE; i++) { if (req & (1 << i)) { - if (result.size()) result += ", "; + if (result.size()) + result += ", "; result += string_VkImageViewType(VkImageViewType(i)); } } @@ -382,7 +380,6 @@ static std::string string_descriptor_req_view_type(descriptor_req req) { return result; } - // Is this sets underlying layout compatible with passed in layout according to "Pipeline Layout Compatibility" in spec? bool cvdescriptorset::DescriptorSet::IsCompatible(const DescriptorSetLayout *layout, std::string *error) const { return layout->IsCompatible(p_layout_, error); @@ -469,11 +466,10 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::map(descriptors_[i].get())->GetImageView() - : static_cast(descriptors_[i].get())->GetImageView(); + ? static_cast(descriptors_[i].get())->GetImageView() + : static_cast(descriptors_[i].get())->GetImageView(); auto reqs = binding_pair.second; auto image_view_state = getImageViewState(device_data_, image_view); @@ -484,8 +480,8 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::mapcreateInfo.samples != VK_SAMPLE_COUNT_1_BIT) { + if ((reqs & DESCRIPTOR_REQ_SINGLE_SAMPLE) && image_node->createInfo.samples != VK_SAMPLE_COUNT_1_BIT) { std::stringstream error_str; error_str << "Descriptor in binding #" << binding << " at global descriptor index " << i << " requires bound image to have VK_SAMPLE_COUNT_1_BIT but got " @@ -503,8 +498,7 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::mapcreateInfo.samples == VK_SAMPLE_COUNT_1_BIT) { + if ((reqs & DESCRIPTOR_REQ_MULTI_SAMPLE) && image_node->createInfo.samples == VK_SAMPLE_COUNT_1_BIT) { std::stringstream error_str; error_str << "Descriptor in binding #" << binding << " at global descriptor index " << i << " requires bound image to have multiple samples, but got VK_SAMPLE_COUNT_1_BIT."; -- cgit v1.2.3