Commit Graph

10 Commits

Author SHA1 Message Date
Charles Giessen ade4922867 Refactor TestLayer framework interface
By adding builder style usage to most of the layer interface, it is easier to
create and use layers in tests. This commit refactors the layer interface and
updates most of the tests to use this style.
2021-12-10 17:08:23 -07:00
Charles Giessen 936a4c7a57 test: Update WrapObjects test to new framework
Moved over the WrapObjects test logic into the new framework, removing all
the old tests infrastructure that is no longer needed.
2021-10-07 10:00:08 -06:00
Charles Giessen 5f96256afb test: Add test which calls GetPDProps inside CreateInstance
This test makes sure that any layer calling GetPDProps inside of CreateInstance
succeeds and doesn't crash.
2021-09-10 13:59:45 -06:00
Charles Giessen fea09c7783 test: Add callback to layers create instance and device
This allows some code to be written inside the test which then gets run
during the call to vkCreateInstance and vkCreateDevice.
2021-09-10 13:59:45 -06:00
Charles Giessen d76cef07ce test: Improved Test Wrapper interface
Made InstanceWrapper and DeviceWrapper simpler to use by moving them to test_environment
then making the Create() member functions and doing the gtest assertions in the function
itself.

Additionally:
Removed the `detail` namespace in the test_environment.
Renamed get_new_test_icd/layer to just `reset_icd/layer`. This is clearer about what it
is doing and makes the interface more expressive with code such as
`env->reset_icd().SetMinInterfaceVersion(5);`
2021-09-06 18:19:14 -06:00
Charles Giessen edb1910450 test: Update Device Layers Match test
Move the old EnumerateDeviceLayers.LayersMatch to the new framework,
implementing the necessary components in the TestLayer code path.
2021-08-16 18:06:03 -06:00
Charles Giessen e247227fad test: Implemente layer create instance/device
Added the necessary bits to make calling create instance and device function,
though it may not work in all circumstances
2021-08-04 09:57:16 -06:00
Charles Giessen 99c066a0c6 test: Fix TestLayer exports on windows
* `get_instance_func` needed to have __stdcall (VKAPI_ATTR) added
* Several .def files were incorrect
* vk_layer.h forward declares vkNegotiateLoaderLayerInterfaceVersion. This is
problomatic because it doesn't have __declspec(dllexport), a token added by
FRAMEWORK_EXPORT on windows. We have to special case the export macro here to
prevent that mismatched definition.
2021-07-06 10:03:29 -06:00
Charles Giessen e68175413f test: Add Enumeration Function stubs to TestLayer
Change-Id: I68b3597877fed803f4284e7e67f19ce4e3e2fe53
2021-07-06 10:03:29 -06:00
Charles Giessen bb68c98c56 test: Flesh out TestLayer to include relevant exports
Functions needed in the various layer interface versions are now
exported as well as guarded behind macros configurable from CMake.
The export_definitions folder was populated as well.

Change-Id: Iebfdd8ae02062eb81b8aa9f705885c9384c95be9
2021-07-06 10:03:29 -06:00