Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 717fb50

Browse files
committed
Fix code style inconcistency in vkAllocateDescriptorSets
1 parent 2c0c371 commit 717fb50

9 files changed

Lines changed: 9 additions & 9 deletions

05_Uniform_buffers/01_Descriptor_pool_and_sets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ std::vector<VkDescriptorSet> descriptorSets;
129129
...
130130
131131
descriptorSets.resize(swapChainImages.size());
132-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
132+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
133133
throw std::runtime_error("failed to allocate descriptor sets!");
134134
}
135135
```

code/22_descriptor_sets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ class HelloTriangleApplication {
778778
allocInfo.pSetLayouts = layouts.data();
779779

780780
descriptorSets.resize(swapChainImages.size());
781-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
781+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
782782
throw std::runtime_error("failed to allocate descriptor sets!");
783783
}
784784

code/23_texture_image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ class HelloTriangleApplication {
923923
allocInfo.pSetLayouts = layouts.data();
924924

925925
descriptorSets.resize(swapChainImages.size());
926-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
926+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
927927
throw std::runtime_error("failed to allocate descriptor sets!");
928928
}
929929

code/24_sampler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ class HelloTriangleApplication {
959959
allocInfo.pSetLayouts = layouts.data();
960960

961961
descriptorSets.resize(swapChainImages.size());
962-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
962+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
963963
throw std::runtime_error("failed to allocate descriptor sets!");
964964
}
965965

code/25_texture_mapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ class HelloTriangleApplication {
975975
allocInfo.pSetLayouts = layouts.data();
976976

977977
descriptorSets.resize(swapChainImages.size());
978-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
978+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
979979
throw std::runtime_error("failed to allocate descriptor sets!");
980980
}
981981

code/26_depth_buffering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ class HelloTriangleApplication {
10701070
allocInfo.pSetLayouts = layouts.data();
10711071

10721072
descriptorSets.resize(swapChainImages.size());
1073-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
1073+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
10741074
throw std::runtime_error("failed to allocate descriptor sets!");
10751075
}
10761076

code/27_model_loading.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ class HelloTriangleApplication {
11161116
allocInfo.pSetLayouts = layouts.data();
11171117

11181118
descriptorSets.resize(swapChainImages.size());
1119-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
1119+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
11201120
throw std::runtime_error("failed to allocate descriptor sets!");
11211121
}
11221122

code/28_mipmapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ class HelloTriangleApplication {
12101210
allocInfo.pSetLayouts = layouts.data();
12111211

12121212
descriptorSets.resize(swapChainImages.size());
1213-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
1213+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
12141214
throw std::runtime_error("failed to allocate descriptor sets!");
12151215
}
12161216

code/29_multisampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ VkSampleCountFlagBits getMaxUsableSampleCount() {
12691269
allocInfo.pSetLayouts = layouts.data();
12701270

12711271
descriptorSets.resize(swapChainImages.size());
1272-
if (vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets[0]) != VK_SUCCESS) {
1272+
if (vkAllocateDescriptorSets(device, &allocInfo, descriptorSets.data()) != VK_SUCCESS) {
12731273
throw std::runtime_error("failed to allocate descriptor sets!");
12741274
}
12751275

0 commit comments

Comments
 (0)