aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-01-26 12:16:30 -0700
committerMark Lobodzinski <mark@lunarg.com>2017-01-26 13:42:36 -0700
commit2dbc2668169e3aa0920615f3d9078a904827ee25 (patch)
treed1bbe0a79bd08b7583de761b34370ce8a024eb9b /layers/descriptor_sets.cpp
parenta5eea415de5d59186dcbd74f76a5bcdf8ffed8de (diff)
downloadusermoji-2dbc2668169e3aa0920615f3d9078a904827ee25.tar.xz
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
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp26
1 files changed, 10 insertions, 16 deletions
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<uint32_t,
}
}
}
- }
- else if (descriptor_class == ImageSampler || descriptor_class == Image) {
+ } else if (descriptor_class == ImageSampler || descriptor_class == Image) {
auto image_view = (descriptor_class == ImageSampler)
- ? static_cast<ImageSamplerDescriptor *>(descriptors_[i].get())->GetImageView()
- : static_cast<ImageDescriptor *>(descriptors_[i].get())->GetImageView();
+ ? static_cast<ImageSamplerDescriptor *>(descriptors_[i].get())->GetImageView()
+ : static_cast<ImageDescriptor *>(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::map<uint32_t,
// bad view type
std::stringstream error_str;
error_str << "Descriptor in binding #" << binding << " at global descriptor index " << i
- << " requires an image view of type " << string_descriptor_req_view_type(reqs)
- << " but got " << string_VkImageViewType(image_view_ci.viewType) << ".";
+ << " requires an image view of type " << string_descriptor_req_view_type(reqs) << " but got "
+ << string_VkImageViewType(image_view_ci.viewType) << ".";
*error = error_str.str();
return false;
}
@@ -493,8 +489,7 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::map<uint32_t,
auto image_node = getImageState(device_data_, image_view_ci.image);
assert(image_node);
- if ((reqs & DESCRIPTOR_REQ_SINGLE_SAMPLE) &&
- image_node->createInfo.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::map<uint32_t,
return false;
}
- if ((reqs & DESCRIPTOR_REQ_MULTI_SAMPLE) &&
- image_node->createInfo.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.";