Skip to content

Commit b3beb2d

Browse files
Merge pull request #54 from KhronosGroup/remove_device_layers
Remove deprecated mentions/use of device validation layers
2 parents a0e804f + 1f7a1c4 commit b3beb2d

30 files changed

+2
-217
lines changed

attachments/04_logical_device.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,6 @@ class HelloTriangleApplication {
205205

206206
createInfo.enabledExtensionCount = 0;
207207

208-
if (enableValidationLayers) {
209-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
210-
createInfo.ppEnabledLayerNames = validationLayers.data();
211-
} else {
212-
createInfo.enabledLayerCount = 0;
213-
}
214-
215208
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
216209
throw std::runtime_error("failed to create logical device!");
217210
}

attachments/05_window_surface.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,6 @@ class HelloTriangleApplication {
225225

226226
createInfo.enabledExtensionCount = 0;
227227

228-
if (enableValidationLayers) {
229-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
230-
createInfo.ppEnabledLayerNames = validationLayers.data();
231-
} else {
232-
createInfo.enabledLayerCount = 0;
233-
}
234-
235228
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
236229
throw std::runtime_error("failed to create logical device!");
237230
}

attachments/06_swap_chain_creation.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,6 @@ class HelloTriangleApplication {
243243
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
244244
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
245245

246-
if (enableValidationLayers) {
247-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
248-
createInfo.ppEnabledLayerNames = validationLayers.data();
249-
} else {
250-
createInfo.enabledLayerCount = 0;
251-
}
252-
253246
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
254247
throw std::runtime_error("failed to create logical device!");
255248
}

attachments/07_image_views.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,6 @@ class HelloTriangleApplication {
249249
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
250250
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
251251

252-
if (enableValidationLayers) {
253-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
254-
createInfo.ppEnabledLayerNames = validationLayers.data();
255-
} else {
256-
createInfo.enabledLayerCount = 0;
257-
}
258-
259252
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
260253
throw std::runtime_error("failed to create logical device!");
261254
}

attachments/08_graphics_pipeline.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,6 @@ class HelloTriangleApplication {
250250
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
251251
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
252252

253-
if (enableValidationLayers) {
254-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
255-
createInfo.ppEnabledLayerNames = validationLayers.data();
256-
} else {
257-
createInfo.enabledLayerCount = 0;
258-
}
259-
260253
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
261254
throw std::runtime_error("failed to create logical device!");
262255
}

attachments/09_shader_modules.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,6 @@ class HelloTriangleApplication {
251251
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
252252
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
253253

254-
if (enableValidationLayers) {
255-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
256-
createInfo.ppEnabledLayerNames = validationLayers.data();
257-
} else {
258-
createInfo.enabledLayerCount = 0;
259-
}
260-
261254
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
262255
throw std::runtime_error("failed to create logical device!");
263256
}

attachments/10_fixed_functions.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,6 @@ class HelloTriangleApplication {
255255
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
256256
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
257257

258-
if (enableValidationLayers) {
259-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
260-
createInfo.ppEnabledLayerNames = validationLayers.data();
261-
} else {
262-
createInfo.enabledLayerCount = 0;
263-
}
264-
265258
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
266259
throw std::runtime_error("failed to create logical device!");
267260
}

attachments/11_render_passes.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,6 @@ class HelloTriangleApplication {
258258
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
259259
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
260260

261-
if (enableValidationLayers) {
262-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
263-
createInfo.ppEnabledLayerNames = validationLayers.data();
264-
} else {
265-
createInfo.enabledLayerCount = 0;
266-
}
267-
268261
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
269262
throw std::runtime_error("failed to create logical device!");
270263
}

attachments/12_graphics_pipeline_complete.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,6 @@ class HelloTriangleApplication {
260260
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
261261
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
262262

263-
if (enableValidationLayers) {
264-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
265-
createInfo.ppEnabledLayerNames = validationLayers.data();
266-
} else {
267-
createInfo.enabledLayerCount = 0;
268-
}
269-
270263
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
271264
throw std::runtime_error("failed to create logical device!");
272265
}

attachments/13_framebuffers.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,6 @@ class HelloTriangleApplication {
266266
createInfo.enabledExtensionCount = static_cast<uint32_t>(deviceExtensions.size());
267267
createInfo.ppEnabledExtensionNames = deviceExtensions.data();
268268

269-
if (enableValidationLayers) {
270-
createInfo.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
271-
createInfo.ppEnabledLayerNames = validationLayers.data();
272-
} else {
273-
createInfo.enabledLayerCount = 0;
274-
}
275-
276269
if (vkCreateDevice(physicalDevice, &createInfo, nullptr, &device) != VK_SUCCESS) {
277270
throw std::runtime_error("failed to create logical device!");
278271
}

0 commit comments

Comments
 (0)