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

Skip to content

Commit 23ff1f7

Browse files
committed
Mention deprecation of device layers
1 parent 839fb32 commit 23ff1f7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

03_Drawing_a_triangle/00_Setup/04_Logical_device_and_queues.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ there are Vulkan devices in the system that lack this ability, for example
100100
because they only support compute operations. We will come back to this
101101
extension in the swap chain chapter.
102102

103-
As mentioned in the validation layers chapter, we will enable the same
104-
validation layers for devices as we did for the instance. We won't need any
105-
device specific extensions for now.
103+
Previous implementations of Vulkan made a distinction between instance and device specific validation layers, but this is [no longer the case](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#extendingvulkan-layers-devicelayerdeprecation). That means that the `enabledLayerCount` and `ppEnabledLayerNames` fields of `VkDeviceCreateInfo` are ignored by up-to-date implementations. However, it is still a good idea to set them anyway to be compatible with older implementations:
106104

107105
```c++
108106
createInfo.enabledExtensionCount = 0;
@@ -115,6 +113,8 @@ if (enableValidationLayers) {
115113
}
116114
```
117115

116+
We won't need any device specific extensions for now.
117+
118118
That's it, we're now ready to instantiate the logical device with a call to the
119119
appropriately named `vkCreateDevice` function.
120120

0 commit comments

Comments
 (0)