Loader single EnumPhysDev call through layers
authorMark Young <marky@lunarg.com>
Thu, 2 Dec 2021 23:55:13 +0000 (16:55 -0700)
committerMark Young <marky@lunarg.com>
Wed, 16 Feb 2022 15:29:42 +0000 (08:29 -0700)
commit0a19663fef75d5ccada5c57d5ce60cb3f448299d
tree2c519f7ebbd5aaf67003f3e2bdbf9f0bc8f23265
parentedb793cf31480ae71f7462e8ae2bf13188143682
Loader single EnumPhysDev call through layers

The loader trampoline previously would query all devices every time
vkEnumeratePhysicalDevices was called.
To do this, it would make two calls every time:
  - First, it would ignore the passed in user values
  - Second, it would query the total number of available devices.
  - Third, it would query the values for every available device

This resulted in layers reporting 2 vkEnumeratePhysicalDevices call for
every 1 the application made which could get very polluted in output.
It didn't break any functionality, just made things messy.

This change removes that behavior and adds a bunch of test cases to verify
nothing broke in the move.
17 files changed:
loader/loader.c
loader/loader.h
loader/loader_common.h
loader/loader_linux.c
loader/trampoline.c
tests/framework/framework_config.h.in
tests/framework/icd/physical_device.h
tests/framework/icd/test_icd.cpp
tests/framework/icd/test_icd.h
tests/framework/layer/CMakeLists.txt
tests/framework/layer/test_layer.cpp
tests/framework/layer/test_layer.h
tests/framework/layer/wrap_objects.cpp
tests/loader_debug_ext_tests.cpp
tests/loader_layer_tests.cpp
tests/loader_regression_tests.cpp
tests/loader_version_tests.cpp