Warn user when using device layers field #1086
authorChristophe <christophe@lunarg.com>
Tue, 3 Jan 2023 15:37:15 +0000 (16:37 +0100)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 14 Feb 2023 17:30:44 +0000 (10:30 -0700)
commit02ac9a774693e61408a662e496f70c574eb9fe41
tree0880eec518d19083957d85bb04e3ab54aa871056
parent74221a9a55c1b537db90a2d502bb1914db180358
Warn user when using device layers field #1086

The device layer fields in VkDeviceCreateInfo are deprecated and have
been for years. Users should not be adding anything to them (and if
they do, it should match the layers added in VkInstanceCreateInfo).

This would be a warning that 'device layers are deprecated, they do
nothing' in case a user is trying to enable validation layers using
them. Charles has seen multiple users not knowing that they are
deprecated and get burned by the API due to not having validation
layers enabled.

Since there may be applications in the wild which currently do provide
a list of layers to device create info, this warning should only be
issued if the list differs from instance creation. That way no spurious
warnings are created.
loader/loader.c
loader/loader_common.h
tests/framework/test_environment.cpp
tests/framework/test_environment.h
tests/loader_regression_tests.cpp