Commit Graph

1055 Commits

Author SHA1 Message Date
Charles Giessen
ba70a411f8 test: Use MACRO=1 in TestICD for definition style
This replaces instances of `#ifdef MACRO_NAME` with `#if MACRO_NAME` as now
MACRO_NAME will have a value of 0 or 1, instead of it being defined or not
defined.

Change-Id: I27a4330511a0f0d779f41851fe816fc79e868de2
2021-07-06 10:03:29 -06:00
Charles Giessen
0a8af1ba78 test: Update Framework Readme.md
Change-Id: Iaf3740b046b3f6457c337988c573a73f068ff1a3
2021-07-06 10:03:29 -06:00
Charles Giessen
77f74505d9 test: Use a new string_eq function instead of raw strcmp
Change-Id: I703763133c42eb78ae3c6e194450411e3f784e35
2021-07-06 10:03:29 -06:00
Charles Giessen
436222fdfc test: Drop fp_ from function pointer names
Change-Id: Ibd047e99f442d4a9755ac186e16b3620d3544e37
2021-07-06 10:03:29 -06:00
Charles Giessen
8074954f95 test: Remove some redundant tests in old test suite
Change-Id: Icc84b25bb092e15e054433651112e86b30726e52
2021-07-06 10:03:29 -06:00
Charles Giessen
5097a3d4e6 test: Rename regressions test cases
From RegressionTests.CreateInstanceExampleTestCase
To CreateInstance.ExampleTestCase

Change-Id: Ibd74541f93edbcaccb3daa9016dcacf8ecccfa78
2021-07-06 10:03:29 -06:00
Charles Giessen
0a1a346b0b test: Remove Allocation tests from old test suite
loader_alloc_callback_tests.cpp now contain all of the removed tests.

Change-Id: Ia99df3a8f86d40f0d5e89a62b7b0a5f9bebafb7c
2021-07-06 10:03:29 -06:00
Charles Giessen
e3fd8bdec3 test: Delete old temp folders when starting tests/framework/test_util
Make sure the work space is clean before starting a test, this is mainly for developer builds, as CI
runs will generally wipe the entire build tree instead.
2021-06-23 15:15:56 -06:00
Charles Giessen
008212c324 test: Add revamped allocation tests
Creates a memory tracker class and rewrites the existing allocation tests.

Change-Id: I09ca2dc5b4d83f775ae0e3fd362a3fa4f7255d27
2021-06-23 15:15:56 -06:00
Charles Giessen
f16c6ab15d ci: Enable regression tests on MacOS
Change-Id: I85b08bfd2914e03840a027240470e2596415f4dc
2021-06-22 12:03:05 -06:00
Charles Giessen
f4054d561b test: Fix framework to work on MacOS
Main issue was getting function redireciton to work, dyld-interposer accomplishes that.
It required making the shim-library a dylib, but otherwise only required minor changes.

Change-Id: I7b7e2c86cc0c0b082f58241a7e146b74af72e792
2021-06-22 12:03:05 -06:00
Charles Giessen
7e2d7ba84f test: Refactor tests that use VK_ICD_FILENAMES
Change-Id: I34117fd500f7110669ae19d32ff1e1be920238a9
2021-06-07 14:07:38 -07:00
Charles Giessen
43c0621343 test: Control process elevation on Windows
Since the loader only uses environment variables if the process is
not running with elevated priviledges, the test harness needs to be
able to control that aspect to ensure consistency as CI systems may
run the tests in an 'elevated' context.

Change-Id: I8b15a1ecd4ab4960049ba198af8199943e872bba
2021-06-07 14:07:38 -07:00
Charles Giessen
61bfd930ee test: Delete files properly on windows
Move windows specific error reporting to test_util.h
This allows for its use anywhere its required.

Change-Id: I14a0da85dc0d3f4e651b99aa005469b47d98d940
2021-06-07 14:07:38 -07:00
Charles Giessen
fcc549fcc1 test: Fix Windows x86 icd shim exports
_stdcall in Windows x86 builds would mangle names even with `export "C"`
By adding .def files, the correct name is used in the .dll and the loader will
correctly load it.

Additionally, ShimEnumAdapters2 needs _stdcall for 32 bit mode

Change-Id: Ia60a5e2a9e4378dc3e09864648e04852b10fe524
2021-06-07 14:07:38 -07:00
Charles Giessen
f7442f9679 ci: Enable regression tests in Windows CI
Change-Id: I5bb1d03f9c9a3be82f7ed0763a325996a5d8dae8
2021-06-07 14:07:38 -07:00
Charles Giessen
b83102e3d5 tests: Include <memory> in test_util.h
Change-Id: If2b6766521dd6bea5478b6316eadef8ce3e048cf
2021-05-28 18:43:26 -06:00
Charles Giessen
ddf5be24cb tests: fix spelling in loader_validation_tests
Change-Id: I2e278b959cd1d47bdc0d7fc19965e4d57e71b481
2021-05-27 16:59:28 -06:00
Charles Giessen
a9db451501 test: Add regression tests code
These files are the current 4 source code files used to create the
regression test suite

loader_regression_tests.cpp and loader_version_tests.cpp contain a
majority of the tests.

loader_wsi_test.cpp is all the tests pertaining to the WSI functions
in the loader.

loader_testing_main.cpp contains the `main()` which has windows CRT
specific calls to disable popups and debug aserts.

There are two executables created, test_regression and test_wsi.
test_regression is both regression_tests and version_tests. test_wsi
is the WSI tests. These tests are separate as they rely on linking
with platform specific windowing libraries which may not be present
on a CI system.

Change-Id: I1c02b0f82826d337599f4a9a7c02dde40ea5afa3
2021-05-27 16:59:28 -06:00
Charles Giessen
88480c3d24 test: Add framework test_environment
The test environment is the code which glues the platform shim,
TestICD, and TestLayers together so that test code can be easily
written. The main components tests use are the SingleICDShim and
MultipleICDShim classes. Both take care of copying the ICD binaries,
setting up the manifests, and redirecting the platform specific
systems to point at those manifests.

Change-Id: I7cbb76c9555fe13b323173c3838cbb3616b77a18
2021-05-27 16:59:28 -06:00
Charles Giessen
b1b5de42ca test: Add test framekwork layer utility
At the present moment, this change is to define simple layer
utilities that tests in the future may use.

Change-Id: I9ab5e1950da64061997891a0527d0f70a49e41e7
2021-05-27 16:59:28 -06:00
Charles Giessen
25470c9111 test: Add framework platform abstraction shim
The loader queries various platform systems for info such as the
location of ICDs and layers. To isolate the loader during testing
from the system it is running on, the platform shim intercepts the
necessary functions so that the contents of the systems queried by
the loader can be configured by tests.

On windows this involves 2 aspects:
Detouring Win32 API functions and redirecting the registry.
The `Detours` library is used to easily capture Win32 API calls.
And the registry uses `RegOverridePredefKey` to redirect the registry
entries the loader accesses.

On linux this only involves intercepting 3 functions; `opendir`,
`access`, and `fopen`. This allows the framework to tell the loader
what to actuall open/access/fopen. These interceptions call the
underlying function but with altered arguments, specifically to
paths the tests set up.

Change-Id: I3531a1cb190c489ffd9f1f0549d0ebcacb3818c5
2021-05-27 16:59:28 -06:00
Charles Giessen
b7d170b7ad tests: Add TestICD for mocking ICD's
The TestICD is a configurable ICD which can recreate much of the
behavior the loader expects of an ICD. Combined with a direct line
of communication between the tests and TestICD, tests can setup
specific conditions that have a known response from the loader,
thus allowing proper regression testing.

Change-Id: I84303f0ddb6011fc1b76dad25fd249abb2da29c9
2021-05-27 16:59:28 -06:00
Charles Giessen
2703d19221 test: Add framework cmake and utilities
Create the CMake infrastructure for a testing framework.
`test_util.h/.cpp` contains the core macros, wrappers, and utilities.
framework_config.h.in is the header that other components include
to get the full path to binaries on a system.

Change-Id: I3e24a3ee4ff24da499a3bca63059e3b872d3981c
2021-05-27 16:59:28 -06:00
Mike Gorchak
977ac085f3 Rename build option to make it clearer that it belongs to QNX only. 2021-04-06 14:52:51 -06:00
Mike Gorchak
684c2a6873 Add support for QNX platform. 2021-04-06 14:52:51 -06:00
Michel Zou
8e2b7d03cc tests: Use cmake -E copy instead of xcopy 2020-10-26 18:42:56 -06:00
Lenny Komow
f65039de1e tests: Change license to Apache 2.0
Change-Id: Id0d23d1373154512b9e94af89a046b6b4e6d932b
2020-08-27 14:26:22 -06:00
Biswapriyo Nath
2979391e5b loader: Fix some non-msvc compiler warnings
changes:
* loader/loader.c: cast dxgi_factory to void** type
* tests/loader_validation_tests.cpp: check if __STDC_FORMAT_MACROS is already defined
* tests/test_common.h: check if NOMINMAX is already defined
* tests/test_commogn.h: check _MSC_VER instead of WIN32 before pragma warning directive

Change-Id: I2fd78b760a90c2ac0e6463a60f5593a24ca904b8
2020-08-19 15:46:13 -06:00
Charles Giessen
3682237cb3 tests: fix non-msvc windows test building
Building the tests outside of msvc wouldn't work due to improper setup.
This commit fixes the typos and missing debug/release switches for
google-test.

Change-Id: Ifdc2cdab8236c35ba9e14663fffaa412f40aaa6a
2020-04-15 14:06:58 -06:00
Lenny Komow
48ab2f8c9f tests: Update layer path test to strip empty paths
Change-Id: Ib6f209650894e44955b82aa47a5e24f2d3640acc
2020-04-08 14:08:06 -06:00
Mike Weiblen
b0c27ce328 tests: Use complete version from header
Change-Id: Ic194ff680af778d7221b60be14be20db57930244
2020-03-27 10:17:05 -06:00
Lenny Komow
161b28c1e9 repo: Remove the option to build a static loader
This option should not have been used, as an application that statically
links to the loader is likely to break as a result of driver updates.

Change-Id: I6bc05ac6fac601f439274fd8efeb0cd76564ccd1
2019-11-21 16:50:59 -07:00
Mike Schuchardt
8f31c12e51 build: CMake use pre-generated source 2019-07-19 10:36:03 -07:00
Dan Sinclair
9dcebf5009 tests: Set enable_testing in cmake file.
This CL adds the enable_testing() cmake call and registers
vk_loader_validation_tests as a test in cmake.

This allows the test to be run when `ctest` is executed.

Change-Id: I57fd579c7625fbf7bbd468a5716e3a68b601c1fd
2019-06-24 15:17:33 -06:00
Felix Dörre
0679472c1f layers: formatting 2019-04-29 16:13:15 -06:00
Felix Dörre
b89fe4377a tests: add test case for layer device creation 2019-04-29 16:13:15 -06:00
Nuno Subtil
7c4909fbb3 build: Use Vulkan::Headers target to determine include paths
Change-Id: I73b9b2bfd5e33a9da861937510029cb71f3b2648
2019-03-05 13:49:11 -07:00
Felix Dörre
15e3d18cef layers: make win-build happy 2018-12-20 15:32:14 -07:00
Felix Dörre
ea69815acb fmt: use formatting as suggested by CI 2018-12-20 15:32:14 -07:00
Felix Dörre
a8ef9fcf55 tests: enhance layer tests to be able to handle VkCreateDevice 2018-12-20 15:32:14 -07:00
Felix Dörre
6075d63ab2 tests: enhance wrapped objects test 2018-12-20 15:32:14 -07:00
Jeremy Hayes
c876454742 tests: Flock the implicit layer test
Fix #121

Change-Id: I2e060a3ddda3bf919d6be8a3e0af7169ac0fee63
2018-12-18 17:43:29 -07:00
Shannon McPherson
c389e8ca45 tests: Modify vk_layer_logging.h for hdr 1.1.95
The `VkDebugUtilsObjectNameInfoEXT` member of the
`VkDebugUtilsMessengerCallbackDataEXT` struct was turned const in Vulkan
header 1.1.95 and modifications were required for compilation

Change-Id: I0e52d821239a2b74c8880864a9522359f2285d72
2018-12-03 18:29:45 -07:00
Jeremy Hayes
038f0844cb build: fix ninja on windows
Use target_compile_options to avoid setting invalid compile options on
asm targets.

Change-Id: I5d95cfd77a2d515f41c7b8c2c9193f3aff906be7
2018-10-30 15:44:52 -06:00
Tony-LunarG
0366721b5b repo: Remove MIR specific code
Note that references in scripts/common_codegen.py and
scripts/loader_extension_generator.py will need to be
removed later

Change-Id: I7b17c80f7a06a339d7df0c199ff556212a7c6534
2018-10-25 09:39:32 -06:00
Mike Weiblen
f3bc815c74 build: CMakeLists.txt cleanup, part 1
This is a first pass reorganization of CMake files in this repo.
It consists primarily of dead code/variable removal, simplification,
and reformatting by latest cmake-format.

bump to cmake_minimum_required(3.4) for ccache

simplify excessive use of generator expressions

clarify why CMAKE_OSX_DEPLOYMENT_TARGET is pre-project().

clarify setting Windows install prefix if needed

remove unused DisplayServer variable

remove obsolete argument to endif()

remove unneeded ccache property RULE_LAUNCH_LINK

ccache doesn't affect linking, so the property is meaningless.

remove unneeded CMAKE_VERBOSE_MAKEFILE hardcode.

remove extra CMAKE_MODULE_PATH

remove extra cmake_minimum_required

change PYTHON_CMD to PYTHON_EXECUTABLE

change CMAKE_SYSTEM_NAME to UNIX/APPLE/WIN32
    Use consistent platform identification.
    Note that UNIX evaluates true for OSX, so whenever the code intends
    "Linux only", we use (UNIX AND NOT APPLE).

remove unneeded TARGET_NAMES variable

remove unneeded VK_LAYER_RPATH variable

change 'ln -sf' to 'cmake -E create_symlink'

reorder dependencies for clarity

rearrange order of macro arguments

rename run_vk_xml_generate to GenerateFromVkXml
rename add_vk_layer to AddVkLayer
    Borrowing from the Google style guide, use camel-case
    to more easily identify locally-defined macros/functions.

remove unneeded WRAP_SRCS variable

remove unneeded TEST_SRCS variable

move check of VulkanRegistry_FOUND

move SCRIPTS_DIR closer to point of use

move include(FindPkgConfig) earlier

move CMAKE_MACOSX_RPATH earlier

move option() eariler

move GenerateFromVkXml invocations earlier

Move invocations to be closer to the definition of the macro.
Minor edits to comments.

move API_NAME earlier

remove unused BUILDTGT_DIR variable

move add_executable() earlier

combine if(WIN32) trees

.cmake-format.py 0.4.1

reformat using cmake-format 0.4.1

Change-Id: Ia251e932dbc9a8f2655201bb12248dea8c940c30
2018-09-20 12:12:14 -06:00
Lenny Komow
f271e3703b repo: Use version from FindVulkanHeaders in build
Change-Id: I565d2e49d965588404ad9ad4ce21f59b3a5abc00
2018-07-20 09:34:08 -06:00
Lenny Komow
3a30df9f5c repo: Rework test layers to use cmake generators
Change-Id: I6a09049619b7155e9f5331f0267d39f1edd42d38
2018-07-19 10:09:40 -06:00
Mark Lobodzinski
95b2c65af6 tests: Remove validation error messages file
This is unneeded for Loader and causes dependency issues.
2018-07-03 13:19:12 -06:00
Mark Lobodzinski
727d8bbcf3 tests: Update JSON files for 1.1.79 header 2018-07-03 11:18:17 -06:00
Mike Weiblen
c781cff2bc build: Beautify cmake files
Add .cmake-format.py
Add cmake-format docs to CONTRIBUTING.md
Minor edits to existing files

Due to a bug in cmake-format, use this script to reformat:

for i in CMakeLists.txt external/CMakeLists.txt loader/CMakeLists.txt tests/CMakeLists.txt tests/layers/CMakeLists.txt
do
    sed --in-place='' 's/^  *#/#/' $i
    cmake-format --in-place $i
done

Change-Id: I8e59c77ae184c88485a97a015ac81d4f71ac4897
2018-06-30 22:55:12 -06:00
Mike Weiblen
2f44988b7a build: Insert copyright in cmake files 2018-06-27 11:36:05 -06:00
Mark Lobodzinski
650d6708a7 repo: Update json files from 1.1.77 to 1.1.78 2018-06-26 13:22:33 -06:00
Karl Schultz
9e6a609591 build: Improve googletest handling
Behavior is largely unchanged except that specifying BUILD_TESTS=ON
with googletest not present no longer quietly skips building the tests.

- Make inclusion of external directory unconditional.  We may someday
  put something there is not related to testing.
- Make default for BUILD_TEST dependent on googletest presence.
- Remove if() around entire contents of tests CMake file.
- Add CMake messaging to clarify googletest activity.
- Throw a CMake error if googletest not present and BUILD_TESTS=ON
2018-06-25 09:02:03 -06:00
Jeremy Kniager
c71d5027a9 header: Update MacOS json files for 1.1.77 header
Change-Id: I7f04938632f42727b8b1edc15be8981c1f239649
2018-06-20 09:12:51 -06:00
Karl Schultz
ff7d761579 cmake: Fixup FOLDER properties 2018-06-14 16:53:01 -06:00
Mark Lobodzinski
cb4603dd79 header: Update json files for 1.1.77 header 2018-06-14 08:54:51 -06:00
Karl Schultz
fa0a872866 cmake: Move loader copy to test dir
- Move the CMake code to copy the loader DLL from the loader target
  definition to the test target definition.  The test should be
  taking responsibility for copying this DLL and it avoids doing the
  copy if BUILD_TESTS is on and gtest is not present.
- Use better CMake code to perform the copy.
2018-06-13 09:33:33 -06:00
Lenny Komow
77909b481f repo: Make tests not try to build without gtest
Change-Id: Idf3ed7bca713cb7ec1964513ac072344feaf17e6
2018-06-06 15:40:13 -06:00
Lenny Komow
16d63efea2 repo: Remove google test submodule
Change-Id: I25734926cdf267e565e0ab5878184a0955e435ee
2018-06-04 15:59:51 -06:00
Lenny Komow
dba71dacd0 docs: Add a short readme to tests directory 2018-05-22 15:41:30 -06:00
Lenny Komow
194bae897c tests: Add user env file for Visual Studio
Add a .user file so that Visual Studio will properly set VK_LAYER_PATH
when running through the IDE.
2018-05-22 15:41:30 -06:00
Lenny Komow
cff7603382 tests: Make layer tests use layers from this repo
There are a couple of tests in the loader tests that test behavior
when enabling layers. This changes them to use layers that are present
in this repo, instead of validation layers.
2018-05-22 15:41:30 -06:00
Lenny Komow
070da24679 repo: Allow BUILD_LOADER=OFF on Windows
If the repo is built without the loader, cmake will now look for an
SDK installation on Windows. On Linux, it will look in the standard
system paths for a loader.
2018-05-21 15:19:29 -06:00
Lenny Komow
3ce4ee6fce repo: Remove API_NAME from cmake files
There used to be functionality to specify a name other than "Vulkan"
for the files, which would allow side by side installations. This
has proven to cause more trouble than it solves, so I'm removing it.
2018-05-21 15:19:29 -06:00
Lenny Komow
0ffa9379e8 repo: Stop building dynamic and static loaders
Add a cmake variable to select weather you want a dynamic or a static
loader, rather than building both every time. This avoids the
redundancy of building everything twice.
2018-05-21 15:19:29 -06:00
Karl Schultz
4941f5943b repo: Reenable Linux install target 2018-05-13 12:07:08 -06:00
Karl Schultz
03d93f31b9 repo: Minor updates for repo split
Add cmake code to copy gtest libs to test binary dir for Windows.
2018-05-13 12:06:29 -06:00
Karl Schultz
23e715f33d repo: Fixup test code and scripts 2018-05-13 12:06:12 -06:00
Karl Schultz
6dadd52e2e repo: Remove dependencies on layers dir 2018-05-13 12:05:24 -06:00
Karl Schultz
241175d73e repo: Make loader tests work on Linux 2018-05-13 11:58:20 -06:00
Karl Schultz
1f18688984 repo: Add googletest submodule 2018-05-13 11:58:20 -06:00
Lenny Komow
ec4336be0a tests: Update tests to remove duplicate slashes
Change-Id: Ie09bfcd61c57024f4c7a0ff884001989fec2a565
2018-05-10 15:27:58 -06:00
Mark Lobodzinski
80e3a1c34c header: Update to version 1.1.74 of Vulkan hdr
- update layer json files
- update vulkan_core.h
- update vk.xml
- update vulkan.hpp
- update validusage.json
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- maintain local changes to reg.py

Change-Id: If0c52d13f78ddfcc7c9d316386c0d20399e97668
2018-04-24 11:59:58 -04:00
Mark Lobodzinski
910e7c4d79 header: Update to version 1.1.73 of the Vulkan hdr
- update json files
- update vk.xml
- update vulkan_core.h
- update validusage.json
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp
- removed checks for the following deprecated VUIDs related to
  ImageCreateInfo and FormatProperties:
  - VALIDATION_ERROR_09e007ae
  - VALIDATION_ERROR_09e007b4
  - VALIDATION_ERROR_09e007ac
  - VALIDATION_ERROR_09e007a6
  - VALIDATION_ERROR_09e007b2
  - VALIDATION_ERROR_09e007a4
  - VALIDATION_ERROR_09e007aa
  - VALIDATION_ERROR_09e007a8
  - VALIDATION_ERROR_09e007a2
  - VALIDATION_ERROR_09e007b0
- modified CreateImageFormatSupportErrors test to remove killed checks
- modified ImageLayerUnsupportedFormat test to remove killed check

Change-Id: I8f1577747d87fdeb6f68b9db0340443a83c44630
2018-04-16 13:23:59 -06:00
Mark Lobodzinski
58b366144b header: Update to version 1.1.72 of the Vulkan hdr
- updated layer json files
- updated vulkan_core.h
- updated validusage.json
- updated vk_validation_error_database.txt
- updated vk_validation_error_messages.h
- updated vuid_mapping.py
- updated vk.xml
- updated vulkan.hpp
- moved vuid 1ae00652 to 1ae00f06

Change-Id: Id6ba342841cca04c0669b7feb39d82e2b8052443
2018-04-06 10:45:21 -06:00
Mike Schuchardt
dbf91d8403 tests: macOS CMake fixes for Xcode generator
Put icd and test layer json files in $<CONFIG> directory when using
Xcode generator so layer tests can be executed and debugged from within
Xcode.

Change-Id: I079a89ea065ddeec98ce95766e284220c67b1859
2018-03-29 13:32:59 -06:00
Mark Lobodzinski
9085c9856c tests: Switch to submodule version of gtest
Switch layer/loader tests over to use the submodule version of
gtest instead of the version checked into the tree.

Change-Id: I0d0bad7531ccf1de0248a48cea347471c99e179f
2018-03-28 11:51:29 -06:00
Mark Lobodzinski
384edd6836 tests: Suppress gtest warnings
Gtest generates GCC warnings for some signed/unsigned mismatches.
Suppress this for the test output.

Change-Id: Ifa3406610e980b81e091976a062cde6457a71377
2018-03-28 11:51:28 -06:00
Mark Lobodzinski
a4c3dd73b1 tests: Resolve gtest/xlib conflicts
Gtest and Xlib each redefine 'None' and 'Bool', which causes
gtest compilation to fail hard. Temporarily clear the definitions
to allow gtest to build using an Xlib display server.

Change-Id: I75e53bbff9266a59ebf53a81c2e148e51de6b7c7
2018-03-28 11:51:20 -06:00
Cody Northrop
1c28bfeda9 android: Start using gtest from NDK 2018-03-27 15:21:53 -06:00
Mark Lobodzinski
c32d82fbd0 header: Update to version 1.1.71 of the Vulkan hdr
- updated vulkan_core.h
- updated vulkan-android.h
- updated vk.xml
- updated validusage.json
- updated layer json files
- updated vulkan.hpp
- updated vuid_mapping.py
- marked 27 VUIDs as complete

Change-Id: Ia5abee76e5346b3a1b769664033d91403946f7a9
2018-03-26 15:29:06 -06:00
Mike Schuchardt
1ab6531241 header: 1.1.70 update
Change-Id: Ifa07a957e3c0e51c9b5c00b6c9d7fff04905c8ab
2018-03-09 13:54:31 -07:00
Mike Schuchardt
8406601cb1 layers: Update VUIDs for 1.1
- Add new VUIDs to database and vuid_mapping.py
- Remove deleted VUIDs from database
- Update vuid_mapping.py to disregard KHR/KHX suffix
- Update spec.py json comparison to update more fields from existing
  VUIDs and delete entries for removed VUIDs
- Update layers and tests that were pointing to deleted VUIDs to use
  replacements
- Revert vuid_mapping.py and run_all_tests.sh workarounds for undefined
  private VUIDs

Change-Id: Ie6c5b01237d5917be66a35337e3dbaf42fea3b00
2018-03-09 13:54:31 -07:00
Lenny Komow
4e61e625a9 tests: Fix loader test capitalization 2018-03-09 13:54:31 -07:00
Mike Schuchardt
7c0ce2bca1 scripts: Private repo VUID workaround
Workarounds for private codegen and tests so they can run without having
to update the VUID mapping or database

Change-Id: Idf71df859f55888103f93f863fc73a0c7a01de2c
2018-03-09 13:54:31 -07:00
Mark Lobodzinski
7bc29f49b1 header: KHX->KHR name changes 2018-03-09 13:54:31 -07:00
Karl Schultz
d81ebfb75a macOS: Add macOS support 2018-03-02 12:21:19 -07:00
Mark Lobodzinski
3791bea7b3 layers: Fix dev-profile test layer dest loc
Destination for device-profile layer binaries was incorrect when
repo built as a submodule.

Change-Id: I5859465f5584e3a0c624a05b42baf9525fb112f3
2018-02-26 08:23:55 -07:00
Mark Lobodzinski
7bd379e554 header: Update to version 1.0.69 of the Vulkan hdr
- updated vulkan.h
- updated vk.xml
- updated layer json files
- updated vulkan.hpp
- updated validation_error_database.txt
- updated vk_validation_error_messages.h
- updated vuid_mapping.py

Note that the VU text in the database file contains artifacts from
the registry/VUID toolchain. These will be addressed in a follow-on
patch set.

Change-Id: I6994ec17a6edcb6c9028c792c68863cd39f1fc56
2018-02-21 08:23:39 -07:00
Dave Houlton
f031f079bf tests: clang-format only
No code changes, just full clang-format.

Change-Id: I096d1b5509897bd642545e3369ccd83ca2849441
2018-02-16 09:31:58 -07:00
Mark Lobodzinski
eb7024602f cmake: Move LVL temp/worker targets into subfolder
This sets up cmake to locate the temporary or worker MSVC projects
into a subfolder called lvl_cmake_targets. This simply unclutters
the Visual Studio Solution Explorer projects pane, and does not
affect functionality.

Change-Id: I6933d05758d6f174a4f66ceaef51d43627210e4f
2018-02-05 13:15:30 -07:00
Mark Lobodzinski
1efcbbc91b cmake: Add PROJECT_BINARY_DIR to cmake files
Tests and test/layers CMakeLists.txt files were missing
this include path variable. This prevents LVL from building when
used as a submodule.

Change-Id: I0746b9ef280ca0bdd75a0a539c5bdc78114a60ba
2018-01-22 11:16:43 -07:00
Mark Lobodzinski
1f2ca1dcce header: Update to version 1.0.68 of the Vulkan hdr
- updated vulkan.h
- updated vk.xml
- updated layer json files
- built and updated vulkan.hpp
- updated vk_validation_error_messages.h
- updated vk_validation_error_database.txt

Change-Id: I5aff6147531f9b91164849ee590f7f86e46e4652
2018-01-17 11:40:37 -07:00
Mark Lobodzinski
04a9855d1b scripts: Default doc validator to non-verbose mode
Change-Id: Ib62e92a3b84609df55179e4868e5030a010f712f
2018-01-08 16:05:55 -07:00
Mark Lobodzinski
a33f719529 header: Update to version 1.0.67 of the Vulkan hdr
- updated vulkan.h
- updated cgenerator.py
- updated generator.py
- updated reg.py
- updated vk.xml
- updated layer json files
- updated vulkan.hpp
- updated vuid_mapping.py
- updated vk_validation_error_database.txt for spec changes, new VUIDs
- updated vk_validation_error_messages.h

Change-Id: Ifb67cf406aa82bf89e72ccfa4e1320cb3b199656
2018-01-08 11:33:52 -07:00
Mike Schuchardt
d2c57ff3d4 tests: Turn off tr1 namespace deprecation warning
The tr1 namespace is used by Google Test and has been deprecated
starting with Visual Studio 15.5.  Turn off the deprecation warning
until we can update Google Test to prevent the build from failing.

Change-Id: I351170ce015ea7abc18ece4db0a511dae6352bf0
2017-12-20 14:45:34 -07:00
Mark Lobodzinski
2364b3627c header: Update to version 1.0.66 of the Vulkan hdr
- update vulkan.h
- update Lin/Win json file versions
- update vk.xml
- update vuid_mapping.py
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp
- fixed error in vk.xml, unofficially

Change-Id: Ia719bc069cb776c5b174f41667d591b43aaaf4d7
2017-11-28 13:15:37 -07:00
Mark Lobodzinski
9a43397f95 header: Update to version 1.0.65 of the Vulkan hdr
- update vulkan.h
- update vk.xml
- update Win/Lin json file versions
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp

Change-Id: Ib20f1955df85a31069c9ffc69c3260973b2c6633
2017-10-30 10:33:34 -06:00
Mark Lobodzinski
a78ed34605 tests: Change wrap objects test filter
Replace blacklist with shorter whitelist.

Change-Id: I4b2ec581e8c4a3b98c3547d45bcb40a497f96e6b
2017-10-19 16:44:23 -06:00
Mark Lobodzinski
3051b4dce6 tests: Correct layer string on wrap_objects script
Change-Id: I9dfaeec4a32475cb888cc7c41ad361b93b0681d7
2017-10-16 16:20:33 -06:00
Jeremy Kniager
454b36a3f4 tests: Fix some LVL tests
Change-Id: I083f6c0d02b94589852d55aefc531908d152a5d7
2017-08-28 12:10:48 -06:00
Mark Lobodzinski
51a41075a9 header: Update to version 1.0.59 of the vulkan hdr
- updated vulkan.h
- updated vk.xml
- updated Win/Lin json files
- rebuilt and updated vulkan.hpp
- updated vk_validation_error_database.txt
- updated vk_validation_error_messages.h
- added new code-generated VUIDs (16) to error database
- modified object tracker for VUID corner-case
- updated vulkaninfo.c for STYPE name change

Change-Id: I0870e8bc4e84867e05bd466c13c7428b9b7365ac
2017-08-23 15:30:31 -06:00
Jeremy Kniager
0136113d47 layers: Add checks for Image/ImageView usage
Change-Id: Ibb2ac5b5f4b4176f5745007598c2fe64665237c2
2017-08-16 09:42:52 -06:00
Mark Lobodzinski
2c60b8cf40 header: Update to version 1.0.58 of the vulkan hdr
- updated vulkan.h
- updated vk.xml
- updated cgenerator.py
- updated Win/Lin json files
- updated vulkan.hpp
- updated vk_validation_error_messages.h
- updated vk_validation_error_database.h

Change-Id: I8c525b6a2bd69914440c6d7984a67446b27e6c23
2017-08-15 08:53:43 -06:00
Mark Lobodzinski
9b18703ad1 header: Update to version 1.0.57 of the vulkan hdr
- updated vulkan.h
- updated vk.xml
- updated cgenerator.py
- updated Win/Lin json files
- updated and fixed vk_validation_error_database.h
- updated vk_validation_error_messages.h
- updated vulkan.hpp

Change-Id: Idebc490660833daac43d234db44131e9bf2b910b
2017-08-01 15:52:25 -06:00
Cody Northrop
e339401f7c tests: Return errorcode on Windows if layer tests fail 2017-07-25 13:24:05 -06:00
Mark Lobodzinski
0348206bd9 header: Update to version 1.0.56 of the Vulkan hdr
- updated vulkan.h
- updated vk.xml
- updated Win/Lin .json files
- updated vk_validation_error_database.h
- updated vk_validation_error_messages.h
- updated vulkan.hpp

Change-Id: Ibf64c8a1760743b3118794b0ef5f6d34b108bbbc
2017-07-24 16:31:54 -06:00
Mark Young
38c120eaf4 loader: Fix vkEnumerateDeviceLayerProperties
The device layers should list the names of the original layers
enabled during vkCreateInstance.  We were expanding the
meta-layers which caused there to be a mismatch in names.

NOTE: that this list still include Implicit and Environment
variable enabled layers since those are techincally enabled at
vkCreateInstance as well.

Change-Id: I3ef88623e96a12a8f18f8f04e95a6f5444f4be56
2017-07-18 15:51:21 -06:00
Mark Lobodzinski
f60b573d2a header: Update to version 1.0.55 of the Vulkan hdr
- updated vulkan.h
- updated generator.py
- updated reg.py
- updated vk.xml
- updated Win/Lin json files
- fixed and updated vulkan.hpp
- updated validation error messages and database
- applied validextensionstruct fixes from 1.0.54 LVL vk.xml file
- fixed parameter_validation DebugMarker prototypes
- fixed unique_objects DebugMarker prototypes
- fixed NV_FILL_RECTANGLE in error DB
- updated error database with new covered VUs

Change-Id: I4eec816a6dc9756105a357beab6af4abb303994d
2017-07-17 17:45:22 -06:00
Mark Young
166e642627 header: Update to 1.0.54 Vulkan release
Update the headers and xml file with the latest spec changes for
Vulkan 1.0.54.  Also, make corresponding loader and layer changes
to support the new extensions.

Change-Id: I11273c5e3e828743f904e4f0b4b2f2c3a7804df0
2017-07-13 10:06:43 -06:00
Tobin Ehlis
82874c33d5 scripts:Skip doc validation if src dir not found
Fixes #1878

If vkvalidatelayerdoc script is not run from a directly two levels
below the layer source, then just skip running it. Print out a message
on how to run doc validation manually for those interested.
2017-06-20 16:52:57 -06:00
Tobin Ehlis
b0835f17eb scripts:Temporarily disable doc validation
Doc validation makes some directory assumptions that are fragile.
Temporarily disabling doc validation from run_all_tests scripts while
I figure out a better solution for how to organize the script and make
sure it can access all the files it needs.
2017-06-16 13:19:23 -06:00
Tony Barbour
1ddf58a4bb tests: Copy device_profile_api json from source
Change-Id: I0277023275f4265ed260d350daaa25a272bd806c
2017-06-15 15:49:01 -06:00
Mark Lobodzinski
b6e6859224 tests: Doc validator test changes
Add doc validator back into Windows run-all-tests script.
Add terse_mode option to win/lin run_all_tests scripts

Change-Id: I4fa02ba5caad374a599c2fed42b8661bdb083a77
2017-06-15 10:04:07 -06:00
Mark Lobodzinski
aeff1b7d52 docs: Remove swapchain refs from docs/text files
Change-Id: I88d9c5ae82159ad6b1976b0b498fbe4ee7f5e2d5
2017-06-12 07:32:50 -06:00
Mark Lobodzinski
de3467fd93 build: Remove swapchain layer build from cmake
Also removed from android makefiles.

Change-Id: Ib4be1c737e9bd9fda21210ed7b234b9242b7b8f5
2017-06-12 07:32:50 -06:00
Mark Lobodzinski
0403f61cc9 header: Update to 1.0.51 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- built and included new vulkan.hpp file

Change-Id: I4f1d5609c8377047165e2ba14e89cba9877436db
2017-06-05 14:13:17 -06:00
Tony Barbour
eb09046883 tests: Add ExceedMemoryAllocationCount using profile layer
Change-Id: I363acfff6cffa5966813dbfd30bb0c28810bd145
2017-06-02 08:41:32 -06:00
Arda Coskunses
01b0a03f85 tests: Add device_profile_api layer
This layer allows our tests to set device attributes (currently only
limits) to values more easily tested against in layer validation
tests.

tests: Don't remove leading vk when asking loader for addresses

Change-Id: I3872fa59a202af34d3e791bd6b3b6d995b578c65

tests: profile layer don't include headers that tests already include

Change-Id: I9b1f8d98d1f8ce2d404466ee278a293e1f26f3b6

layers: device_profile API cleanup

tests: Link device_profile_api to layers directory

Change-Id: I2a55a133d8024d60103ab831db341a034530c9d4

tests: Call down GetPhysicalDeviceProcAddr

in device_profile_api layer

Change-Id: I3b08479bc8bd47f55a2cd094a071bc35e63fa0b5

tests: Update json for device_limits_api layer

Change-Id: I8a6fd15fee7f3e3026c15d8a0ff2e82bb6a71c85

tests: Add .def for device_profile_api layer

Change-Id: Ib19af48dcf68b469e169383de7da6c9ac5e1ecce

tests: Change include order to avoid symbol collision

It turns out that including threading.h ahead of vk_layer_dispatch_table.h
causes CreateSemaphore and CreateEvent to be defined as CreateSemaphoreA
and CreateEventA on Windows

Change-Id: Ib3e8a9536a12bb386b11222c1cf5c617ba2871a3

tests: Rename header file

Change-Id: I2291e3e6fba9a7023828857ced0378668bf552f5

tests: Only save properties in maps

Change-Id: Id1161b7230dc610dfb8b9084dcbbf0022ca5e199

tests: More device profile api layer cleanup

Change-Id: I5df021f1284e8a90d1dc3c0071354c65e2a36539
2017-06-02 08:41:32 -06:00
Mark Lobodzinski
a25e56fba5 header: Update to 1.0.50 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- build new verison of vulkan.hpp
- code fixups for deprecated DebugReportError enum

Note that this does NOT include any shader-checker support for the
VK_AMD_texture_gather_bias_lod extension, as this requires glslang
and SPIR-V updates.

Change-Id: Ie01aed143f2fad065c86e2a27e46fe32ccb9e1f7
2017-05-23 15:04:57 -06:00
Jeremy Hayes
357724a5b1 tests: Add sanity check
Make sure the framework can run a basic test before testing any
further.

Change-Id: If7c0c97730c5b113aa7b3b1fb9e383229cdbab98
2017-05-22 12:38:39 -06:00
Jeremy Hayes
2fc185fc4b tests: Fix layer path
The wrapping test could silently fail if the layer path wasn't set.

Change-Id: I6a8fae3da0e88281f346b8eb8aa4b762b149a785
2017-05-22 12:38:39 -06:00
Mark Young
d0274544f1 loader: gh1771-Fix realloc handling
Fix how the loader handles realloc calls.  Instead of always overriding
the pointer, check to see if the allocation succeeds.

Also, set the paths in our run_all_tests.ps1 to global paths.

Finally, fix a spelling error in the test names.

Change-Id: I7b2e0d246dbe6353d29fb56367397c5d8767aaa2
2017-05-19 13:50:17 -06:00
Mark Lobodzinski
8d73b50139 header: Update to 1.0.49 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated vulkan.hpp -- NOTE: includes workaround for mishandled
                              extension API
- updated parameter validation layer with new APIs

Change-Id: I0b65065e1a0355c18c4a5eafdb0b3d218af6ff91
2017-05-15 16:24:26 -06:00
Mark Young
5fe4084b09 tests: Fix loader test validation
Fix a few validation errors in the loader test which showed up
when validation is enabled.

Thanks to Tony for catching these.

NOTE: If you have an Nvidia and Intel in the system and Optimus
is enabled, you will get errors during the vkEnumerateDeviceGroupsKHX
test which appear to be because of the way Optimus is calling down
with a non-NULL invalid structure for the groups structure.

Change-Id: I808ca01c719a28f55ef3581647f598a4bdd9d18e
2017-05-15 09:30:13 -06:00
Cody Northrop
ccd18ba5fb tests: Allow filtering loader tests on Windows 2017-05-11 11:06:38 -06:00
Mark Young
f6a8389ccb tests: gh1602 - Add define for PRIxLEAST64
In C++, you need to define __STDC_FORMAT_MACROS prior to including
'inttypes.h' in order for it to properly expose PRIxLEAST64.
For some reason, many platforms expose this anyways without the
define, but some dont.

Change-Id: I1f6b6401540c1b84d95525cbe1ebc649f6f2d393
2017-05-01 10:37:05 -06:00
Karl Schultz
2460c81d57 tests: Add some env var testing to loader tests.
Tests recently added env var parsing code added to loader.

Change-Id: Ic58d92dfeaed725f02a8f4a79c60d9b4b363aa3f
2017-04-24 11:13:18 -06:00
Mark Lobodzinski
5a1b30b312 header: Update to 1.0.48 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated vulkan.hpp

Change-Id: I90407d181ad6a4652e1d1f210ee9b9d21c7857b0
2017-04-17 15:36:39 -06:00
Mark Lobodzinski
975826cf81 header: Update to 1.0.47 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated vulkan.hpp

Change-Id: I0da07ad3d623d0f249593fa2d7d8e336e6ee8ad7
2017-04-10 08:05:44 -06:00
Mark Lobodzinski
77ff968ae0 header: Update to 1.0.46 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- fixed include/vulkan/vulkan.hpp -- see Note

Note: The Vulkan.hpp generator asserted when processing the 1.0.46 header
files. Added a temporary workaround for this issue, but it may affect
use of the vulkan.hpp header file.

Change-Id: Iab296bf2004fbf6099baaab148994b15b0392381
2017-04-03 14:05:24 -06:00
Mark Lobodzinski
5499f41c22 header: Update to 1.0.45 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated include/vulkan/vulkan.hpp
- FIXED scripts/vk.xml (see note)

NOTE:
This commit also includes an unofficial change to vk.xml.  The 1.0.45
header update broke the structure definition for device_features2. The
mangled line has been replaced in this update.

Change-Id: If646355a5b211ca90484d449a1c55412decc3de6
2017-03-28 14:35:16 -06:00
Mark Lobodzinski
e66ffe3ec8 header: Update to 1.0.44 Vulkan version
- updated include/vulkan/vulkan.h
- updated scripts/generator.py
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated include/vulkan/vulkan.hpp

Change-Id: I1d18921f75ec74484918be6cfdba394fc397d2f5
2017-03-21 10:12:31 -06:00
Mark Young
03bfe75ee4 tests: Fix loader test build
The loader test build needed the appropriate #include defined
for more than just Windows platforms.

Change-Id: I434ba15586915cab4ce3784ca19a6a6f8f1f129a
2017-03-20 13:08:52 -06:00
Mark Young
3024ca9fd0 tests: Add loader device group tests
Add loader tests to evaluate the results returned by the new
vkEnumeratePhysicalDeviceGroupsKHX extension.

Change-Id: Ia5cf10d283be015080d48bb9e9bc4e84bf3b45b9
2017-03-16 16:14:57 -06:00
Mark Young
1b57bcd870 tests: Add more loader alloc tests
Add more tests to the loader test which validates intentionally
failing during vkCreateInstance and/or vkCreateDevice.  Originally,
we have relied on the CTS tests to catch these issues, but it
makes it more available for general testing if the loader tests do
it as well.

Change-Id: I9043b1c8c0456996954d20e30acf1e2ab3bdd31b
2017-03-16 10:38:05 -06:00
Mark Lobodzinski
32f0756362 header: Update to 1.0.43 header version
- updated include/vulkan/vulkan.h
  - updated scripts/cgenerator.py
  - updated scripts/vk.xml
  - updated layers json files
  - updated tests json files
  - updated loader SOVERSION
  - updated include/vulkan/vulkan.hpp
  - updated parameter_validation.cpp with new APIs
  - updated object_tracker.cpp with new APIs

Change-Id: I1fd812cb376d5cddee5ab4acf2e4f8fe6d33b761
2017-03-14 15:13:15 -06:00
Dave Houlton
86b6cf96a6 tests: Add user env for vlv test project
Added a .user file to set environment for VLV tests automatically
for Windows builds.

Change-Id: I857d01e5040bf1229b159c1094772b31dfd38466
2017-03-13 13:27:07 -06:00
Mark Lobodzinski
9d7d52e999 tests: Added Win post-build gtest DLL copy step
In Visual Studio builds, the gtest.dll and gtest-main.dll files
are now copied into the tests build output directory.

Change-Id: Ifc727ef3c4ab26ed58471136b564f4e7a73b303a
2017-03-13 10:59:08 -06:00
Mark Young
473335e2d9 tests: Fix loader test
On some platforms, the old ASSERT used in one of the tests caused
a compilation error.  This change resolves that error.

Change-Id: I73c97ab76e596fcc2f35e855f31df4fefe095217
2017-03-06 13:11:42 -07:00
Mark Young
b2fda2fb89 tests: Add tests for allocation
Add some coverage of the loader with regards to the allocation
callbacks.

Change-Id: I37f5dc1b24c2611eee5992cfebf52edd62cc586e
2017-03-02 14:19:29 -07:00
Mark Young
f3c1c58ae9 tests: Fix loader tests
Loader test failed on multigpu because it carried a previous failure
value on next iteration before replacing it.

Change-Id: Id67990f37136d89189c832f4b1efc82d6d8a965e
2017-03-01 08:20:22 -07:00
Mark Young
d4e5ba49ff vulkan: update to header 1.0.42
Updated all necessary files to 1.0.42.  This includes the various
headers as well as the loader, and the parameter validation, object
tracking, and threading layers.  Additionally, bump all layer JSON
files to 1.0.42.

Also, in this change:
  - Enable loader extension automation so that the loader now
    generates all extension entry-points automatically during build
    to reduce likelihood of missing a critical piece on header
    update.
  - Enable layer dispatch table extension automation for the same
    reason.
  - Fixes from Mark Lobodzinski and Tony Barbour to resolve crash
    in loader when working with Intel's Windows driver due to
    GetInstanceProcAddr getting called on inappropriate command
    names.

Change-Id: Ic18d3fac2e145c386c0192031deb5089c91a00d8
2017-03-01 08:20:22 -07:00
Cort
3988418671 tests: vk_layer_validation_tests depends on layer targets. 2017-02-21 11:48:27 -08:00
Mark Lobodzinski
704e15e6ed header: Update to Vulkan 1.0.41
updated:
      - include/vulkan/vk_platform.h
      - include/vulkan/vulkan.h
      - scripts/generator.py
      - scripts/cgenerator.py
      - scripts/lvl_genvk.py
      - scripts/reg.py
      - scripts/vk.xml
      - include/vulkan/vulkan.hpp
      - layers/tests json files
      - loader SOVERSION

Change-Id: I1e7c3e39206be3c6d2c12b46c438a1fb9343945e
2017-02-17 09:01:48 -07:00
Mark Lobodzinski
08c3c924b4 tests: Remove image layer dependencies
Change-Id: Ieb8570b037925ba00ebf1dd20a3f260e46057f69
2017-02-16 13:40:19 -07:00
Mark Lobodzinski
87022ce216 layers: Remove image layer refs from docs
Change-Id: I5fd91fd3b1697ca8c27cc89fea016ce131a6a9e6
2017-02-16 13:40:19 -07:00
Mark Lobodzinski
15f41e2dad header: Update to Vulkan 1.0.40
fixed:
       - generators for latex math changes
    updated:
       - include/vulkan/vk_platform.h
       - include/vulkan/vulkan.h
       - scripts/generator.py
       - scripts/lvl_genvk.py
       - scripts/reg.py
       - scripts/vk.xml
       - include/vulkan/vulkan.hpp
       - layers/tests json files
       - loader SOVERSION

Change-Id: Id7d6f9dee73888877f2e7528f5701871f54ece79
2017-02-14 15:18:19 -07:00
Tobin Ehlis
c35c143775 layers:Rename get_my_data_ptr to GetLayerDataPtr
Change utility function get_my_data_ptr() to be named GetLayerDataPtr()
which is more descriptive and capital camel case in-line with coding
standard.
2017-02-08 15:46:17 -07:00
Mark Lobodzinski
e2859eb393 repo: Clang-format LVL source files using Google
Switch clang-format standard from the LLVM style to the
Google style for more consistency.

Change-Id: I247c4abc275d7873a91522e1e234198adaa24033
2017-01-26 15:45:51 -07:00
Mark Lobodzinski
32be7d001e repo: Remove subordinate .clang-format files
Change-Id: I64e05b33dd830e5d2c6e7ed4c5e8a292692eae39
2017-01-26 12:09:23 -07:00
Mark Young
84c04e3460 tests: Add loader test to catch recent bug
Added a loader test to catch the case where the user just calls
vkEnumeratePhysicalDevices with the full count and array passed
in without previously querying the count.  Also, verified that
the count returned with that call matches the count returned by
the standard call.  Finally, added a check for the VK_INCOMPLETE
return value when not enough physical devices are indicated on
a second call.

Change-Id: Ic14a109ca59dcba3ea298ec3c0092403026e9b0c
2017-01-25 15:03:13 -07:00
Mark Young
274e4bcf33 loader: Update the loader to 1.0.39
Add new extensions for 1.0.39.  Also, updated layers to include
minimal set of functionality for 1.0.39 extensions. Extensions include:
 - VK_KHR_get_physical_device_properties2
 - VK_KHR_shader_draw_parameters
 - VK_EXT_direct_mode_display
 - VK_EXT_display_surface_counter
 - VK_EXT_display_control

Also, redo the LoaderAndLayerIf document.

Change-Id: I10412086da7a798afe832a3892e18f606259b5af
2017-01-24 14:07:22 -07:00
Mark Lobodzinski
5fa3c9cf98 tests: Fixup cmake for gen'd layers/tests file deps
Change-Id: Iecec6f318768324ba9bbadc65194f1dcaa9ad6b7
2017-01-23 10:15:52 -07:00
Mark Lobodzinski
a85feddaa7 cmake: Move common xml-gen macro to root file
We had several copies of this macro across the repos -- moved it to
the top-level cmake file for sharing.

Change-Id: I33a97ecb24ad8c7cc6826c1a431f668fa2bec41f
2017-01-23 08:51:08 -07:00
Mark Lobodzinski
921c87e68d build: Disable clang-format header reordering
By default, clang-format will sort header files which often breaks
compilation. Added an option to the main, tests, and layers versions
of these files to disable header reordering.

Change-Id: Ic0cc5727b83d14d5f3962f3ecff7b6bf5e4c5fb9
2016-12-13 13:00:34 -07:00
Tony Barbour
0c91fb3492 Cmake: Move all find_packages to base CMakeLists.txt
Change-Id: Id27307788c7c230e75d620f1bf5470b1450289f2
2016-12-09 11:48:58 -07:00
Tony Barbour
62da8e0073 Cmake: Add files needed to build with Mir
Change-Id: I640e45db5d586a379674fb209e38075ba7f0cf29
2016-12-09 11:48:58 -07:00
Tony Barbour
f38413e531 Cmake: Move WSI compile decision to subdirectories
Change-Id: I61ac8910200a1751a23aa92fe0e7d955ee9e03e5
2016-12-09 11:48:58 -07:00
Mark Lobodzinski
e9c569b75a tests: Add CMake copy of def files to build dir
Change-Id: I39ceb220d0a3466227f0ae9c987aca5094db6d47
2016-12-08 14:52:38 -07:00
Mark Lobodzinski
e9859bb733 tests: Check in Windows def files
Change-Id: Ib2ab6332887c8232b042e3e5c1668e780f1f13f3
2016-12-08 14:52:38 -07:00
Mark Lobodzinski
c9924182fb tests: Tabs to spaces in cmakelists.txt
Change-Id: I5c128e585f1d47a3d38022b8b2944c4ee1c05a1b
2016-12-08 14:51:11 -07:00
Mark Lobodzinski
b3c5d955b0 tests: Enable new dispatch_table_helper generation
Change-Id: Ided624d0509dffd7cb1b004846449ac5c411247b
2016-12-08 14:51:11 -07:00
Mark Lobodzinski
9a05e77e15 build: Move codegen scripts into scripts dir
- Set SCRIPTS_DIR in root CMakeLists.txt
- Update android-generate.bat and android-generate.sh
- Updated layer/loader/tests CMakeLists.txt files for new path
- Updated test layer doc scripts for new location

Change-Id: I2d519ec40883ebeec4e9daab8641ad65515bb08c
2016-11-21 12:06:12 -07:00
Tony Barbour
00f921e169 demos: Enable building combinations of xcb and xlib
Change-Id: I055c12e8c93d05db747239df46611386eb8b8278
2016-11-15 13:04:56 -07:00
Lenny Komow
ca76234922 build: Allow the use of a custom-named vulkan dll
Change-Id: Ibeae30386ca2a91717d6b4c3039ada884003a1a4
2016-11-08 09:07:28 -07:00
Mark Lobodzinski
59f41efd65 scripts: Build single dispatch table helper
Modified layers and tests/layers to use 'AllPlatforms' param
instead of displayserver.

Change-Id: I39d53e3991aab4f01854b227e1f6eb030850473d
2016-11-01 08:46:07 -06:00
Mike Stroyan
981318f232 tests: Get run_wrap_objects_tests.sh working.
Fail from run_loader_tests.sh if run_wrap_objects_tests.sh fails.

Don't run tests in parallel to avoid hangs on some devices.

Filter out new "Unexpected:" lines from vk_layer_validation_tests.
Those lines include varying details that never pass a diff.
2016-10-12 13:48:42 -06:00
Cody Northrop
381fdf099d tests: Remove document validation test
This test requires files outside of the build directory, which
doesn't work when distributing build results.  It will soon be
superseded by a new test for valid enums.  It is still covered
by Linux run_all_tests.sh
2016-10-11 21:56:16 -06:00
Mike Stroyan
e20837d60b Revert "build: Restore default symbol visibility to layers/tests"
This reverts commit dd96dd21b438d48aa78e9de60ad0c550c856cf29.
2016-10-03 16:35:05 -06:00
Karl Schultz
30ca53a076 build: gh52-CMake changes to enable make install on Linux
See BUILD.md for details.

Change-Id: Ide1f635a57b57af384d9d1baac20c2256629f812
2016-10-03 08:35:01 -06:00
Karl Schultz
5fd05fa704 build: gh27 Allow builds in paths with spaces
Add quotes around shell var expansions in the update_external_sources scripts.

For Windows, remove the cmake directives to add a linker option for the DEF
files.  These were redundant with the DEF files getting added via the
cmake add_library() directive.  They were also causing difficult-to-fix
problems with paths that have spaces in them.

Change-Id: I741bac31bbf27deae59031b6aa916c6ab48383a6
2016-09-28 18:12:19 -06:00
Robert Bragg
b573d3ae19 build: include tests/layers build dir for vk_dispatch_table_helper.h
Signed-off-by: Robert Bragg <robert.bragg@intel.com>
2016-09-27 21:35:56 +01:00
Mike Stroyan
f0e3a2f039 build: Fix parallel build of layers tests
Make json copy targets depend on layer targets to first create destination directory.
Make header generation go through a custom target.
2016-09-26 12:58:43 -06:00
Norbert Nopper
2233bb009b Fix, that display only build under Linux works 2016-09-12 11:55:47 -06:00
Mark Lobodzinski
b67054c27d tests: Clang-format loader_validation_tests.cpp
Change-Id: If4f446cc8499bf0c894735923b7661c8e3aa0ae2
2016-09-08 10:44:56 -06:00
Mark Lobodzinski
30b6bc412e tests: Clang-format test_common.h
Change-Id: I9ed4992a3f4cc8215de805d1f984ac9b5300a974
2016-09-08 10:44:56 -06:00
Mark Lobodzinski
26ba91a308 tests: Add clang-format config file
Change-Id: I265cffaf708244d5b268018aa47fc869facce6fd
2016-09-08 10:44:56 -06:00
Karl Schultz
c9131946dd build: Restore default symbol visibility to layers/tests
Layer tests broke with a previous commit to fix CXX
flags inheritance.  This commit repairs the problem.

Change-Id: Id54cfb737f32b6f11a4146225cc22e0b155ba2ba
2016-09-02 11:13:16 -06:00
Karl Schultz
eff15fc378 build: gh672 Fix CMake CXX_FLAGS inheritance
Some sub-projects were overwriting CMAKE_CXX_FLAGS instead of
inheriting from the parent.  This keeps any user settings outside
or above the top CMakeLists.txt file from reaching these sub-projects.

These fixes include preserving the inheritance, adding extra flags
to turn off warnings (mostly in autogen code) because the top
level turns on Wall, and trivial code fixes to avoid the need to
add a setting to turn off a warning for those trivial fixes.

These changes should have no impact on Windows.

Change-Id: I0c3c175cb5058f26a259ee3f4fde9fdaf3e6b00d
2016-09-02 10:17:05 -06:00
Jeremy Hayes
168edf4c17 tests: remove bad tests
These were not supposed to be included in my last commit.

Change-Id: I5b6d6c415c80273dbda824479a71190cbdf4d507
2016-08-19 09:59:57 -06:00
Jeremy Hayes
49d00c651f tests: add implicit layer tests
Change-Id: I84e70b2eaafc59fa8d2c3642c87f3b908532445a
2016-08-18 16:07:12 -06:00
Jeremy Hayes
151e72ebb1 tests: test loader enumeration
Change-Id: I6c469e7f863f48fc2655de835c0b54eb928ee653
2016-07-27 10:10:09 -06:00
Mark Young
38bdf75ef1 layers : gh682 move gipa dispatch table init
Move the GIPA setup of the dispatch tables for layers into
the layer_init_device_dispatch_table call since we're already
doing a majority of it there.  This removes the need to separately
setup the WSI extension entry-points.

Additionally, memset the table to 0, just to make sure anything
that gets added in the future is obvoiusly not set.

Change-Id: I63c7c107cd9f7957e2766fdbeb8a06bc1ae0eda6
2016-07-21 13:24:20 -06:00
Mark Lobodzinski
bebf064ad4 tests: Remove device_limits layer
Change-Id: I482e3fa6b959983d427caef4de7d703b6f7003c2
2016-07-06 09:51:11 -06:00
Jeremy Hayes
cb64ed140f tests: test loader insertion via create-instance
Change-Id: Ifb3a2aa8bfcd7619bdeca54ac8237b267daf7f27
2016-06-30 13:54:48 -06:00
Jeremy Hayes
dfd51c688b tests: test layer insertion
Change-Id: I315a7312514fba817906facf42597c858e2fecd9
2016-06-29 13:01:48 -06:00
Dustin Graves
4893af6f83 tests: Fix Wayland/Mir build
Fix undefined variable issue in the Wayland/Mir
presentation support query functions where 'inst'
needs to be 'phys_dev->inst'

Change-Id: I8fe874acdd66e9a650029ad4f239596f5ae76df7
2016-06-28 17:06:00 -06:00
Rene Lindsay
adf93aa2d0 tests: Ensure deprecated device layers are ignored.
LX535 / MI-76
For backwards compatibility, a device-layer list may still be passed to vkCreateDevice, but must be ignored, and not trigger any errors.
Change-Id: I00000000000000decaf15bad0000000000000076
2016-06-28 10:48:03 -06:00
Jeremy Hayes
4aa4bfbf4e tests: enable sign compare
Change-Id: Ib316109ef38617df9ce7bcc2851354cdf14e192a
2016-06-21 13:33:04 -06:00
Jeremy Hayes
2bf75db226 tests: fix sign comparison warning
Change-Id: Ic87376dc1211c3f9a074353c49bbce24886915ec
2016-06-21 13:32:56 -06:00
Jeremy Hayes
4ce7689f63 tests: test layer and ext not present
Change-Id: Ibf6314a5362423af47e655afc34df0da011b7483
2016-06-20 18:58:08 -06:00
Karl Schultz
7014a81a78 tests: remove unreferenced variables. 2016-06-15 10:37:06 -06:00
Mark Young
f1d3f0d401 tests: Fix type mismatch in wrap_objects
Change-Id: I4544293ae03565f345650a2dd41c8e36b5ab8205
2016-06-14 11:48:50 -06:00
Mark Mueller
76e15d7ff5 layers: Fix CMakeLists.txt for non-MSVC Win builds
Fix a recent change broke windows builds that don't use the VC IDE or
decorate build trees like VC does

Change-Id: I93c8a559c4255408a6fa890b2a3e4d81822d1cea
2016-06-14 08:17:40 -06:00
Jeremy Hayes
8ca7a8b0b4 tests: remove unused flags
Change-Id: I41ffcd1b89d7e18eb4bab3a1cdfb5e92dff017cb
2016-06-13 17:30:42 -06:00
Jon Ashburn
d445a66c39 tests: add dispatchable object wrapping layer
Change-Id: I181fd9b4363d98d4da63017b8bdce68e86e8aefc
2016-06-13 14:25:52 -06:00
Mark Lobodzinski
9dc6de4eb9 tests: Fix line-endings in powershell scripts
Change-Id: Ibf90d79a93cc0689e647942271d86faade0bb1ca
2016-06-09 13:55:12 -06:00
Cody Northrop
0c914c7766 windows: Allow run_all_tests.ps1 to skip tests
Use -TestExceptions to filter out tests with known problems.
Test list should follow a space, separated by a colon, i.e.

powershell -command .\run_all_tests.ps1 -TestExceptions ^
VkLayerTest.RequiredParameter:^
VkLayerTest.UnrecognizedValue
2016-06-03 11:41:26 -06:00
Cody Northrop
208cc78394 windows: Enable vk_loader_validation_tests
Tested and passed on Windows Skylake
2016-06-03 11:41:26 -06:00
Cody Northrop
2429641367 windows: Return exit status from test script 2016-06-03 11:41:26 -06:00
Ian Elliott
d79d353b94 tests: PR512 Start testing enabled WSI extensions (just XCB/Linux now).
The new VkWsiEnabledLayerTest.TestEnabledWsi test is a start at testing many of
the errors in the swapchain layer, when the WSI extensions are enabled.  More
work is needed, with code comments stating some of the obvious work that's
needed.  In addition, the only platform currently supported is Linux/XCB.
2016-05-13 12:44:16 -06:00
Dustin Graves
8e6216bfcc cmake: Fix Windows test script copy
- CMake was configured to copy _run_all_tests.ps1 to
  _vkvalidatelayerdoc.ps1, resulting in _run_all_tests.ps1
  effectively calling itself in an infinte loop.
- Drop the _ prefix from the _run_all_tests.ps1 and
  _vkvalidatelayerdoc.ps1 when copying to build.

Change-Id: I4c682bebe786ef0f2f66ce2eeb9e8174eea83e6f
2016-05-06 14:19:18 -06:00
Jon Ashburn
ecb524fff3 tests: Add loader test to the run_all_test on Linux
Change-Id: Ifb85c25af3be6985ff286ee05d43de76a4e510bc
2016-04-28 17:21:08 -06:00
Tobin Ehlis
e98874fd17 android: Move vulkan_wrapper to common (from Cody) 2016-04-28 14:01:42 -06:00
Cody Northrop
77f1c6e0ca android: Add support for C linkage in vulkan_wrapper 2016-04-28 14:01:42 -06:00
Jeremy Hayes
c087cc4cc4 loader: fix LX475
Silently ignore VK_NULL_HANDLE in DestroyInstance/Device.

Change-Id: I96305088db75932b6f3f824852db9c72b8352120
2016-04-21 15:26:36 -06:00
Jeremy Hayes
8999e1388e tests: add LX435 test
Change-Id: I1c981f70799996b8b01965f2698f3343249be6ad
2016-04-21 15:25:49 -06:00
Jon Ashburn
4f80d6749d misc: Update licenses to Apache 2.0
Change-Id: Id447f4c8c53d33f9192940bdd3ae727b7b738a97
2016-04-19 12:11:25 -06:00
Karl Schultz
f7d9178689 build: rename layers utils lib and fix Windows CMake code
Rename utils lib to VkLayer_utils to use same namespace as
the layers.
The previous Windows CMake code attempted to build both
dynamic and static utils libs, succeeding with only the static.
Change the CMake code to only attempt to build the static lib.
2016-04-08 09:17:18 -06:00
Cody Northrop
51bf361e7f android: Commit latest version of vulkan wrapper 2016-03-24 14:42:59 -06:00
Mark Lobodzinski
842167e9e5 layers: Rename param_checker to parameter_validation
Also, param_check.h -> parameter_validation.h and .json files changed.

Change-Id: I9db10563bcc2640fe6b90588d3c80c4fe50a8a83
2016-03-21 11:31:42 -06:00
Mark Lobodzinski
b0123ea994 layers: Replace draw_state and mem_tracker with core validation
Change-Id: Ib8eb7491f6c60bc6d05da64a2311c8cfa5f88d60
2016-03-16 09:42:44 -06:00
Dustin Graves
fd354e319f cmake: Find spirv/glslang dependencies
Replace the hardcoded glslang and spirv-tools path with
CMake find macros to find the include, library, and programs.

Change-Id: Id498ad75d663f2795207b39b40a11ddfe2c03920
2016-03-15 16:56:26 -06:00
Tobin Ehlis
2f59d9c126 layers: Merge mem_tracker and draw_state layers into core_validation layer
cube & tri --validate now use core_validation instead of MT & DS

Very little efficiency has been pulled out for this initial merge.
A few maps have been merged, but otherwise almost all of the mem_tracker
code is pulled intact and surrounded in "#if MTMERGE" blocks.

Change-Id: Icf060bfc0177fc8c9fa7d8d57f7ddc446357b665
2016-03-15 14:32:16 -06:00
Mark Lobodzinski
6dbc0d7fd4 layers: Make layer option names more consistent and update docs 2016-02-24 11:28:13 -07:00
Karl Schultz
87e1cfe8c9 Remove Khronos confidential clause from license text. 2016-02-10 13:24:39 -07:00
Jeremy Hayes
a37fbb37ac linux: use linux naming conventions 2016-02-08 14:37:10 -07:00
Karl Schultz
b8328c0c05 tests: Copyright updates 2016-02-04 11:33:21 -07:00
Tony Barbour
a58d684cbf remove reference to run_all_tests_with_layers, which has been removed 2016-02-03 15:41:36 -07:00
Mark Young
ce633c8bbe tests: Fix Windows compilation error that popped up recently. 2016-02-03 10:06:27 -07:00
Tony Barbour
1c0ae995c2 Remove all tests except for layer validation and doc validation 2016-02-02 15:02:54 -07:00
Jon Ashburn
df69af640b Revert "misc: Change repo name references to LoaderAndValidationLayers"
This reverts commit 015e74cda0b9ad46bd6127d816f14d699697ec4a.
2016-01-31 10:22:36 -07:00
Jon Ashburn
d7b199024a misc: Change repo name references to LoaderAndValidationLayers 2016-01-31 09:26:05 -07:00
Mark Young
bb9dc18f25 FIXES: Non-MSVC compilers on Windows were failing.
Fixes LunarXchange Issue #301.
2016-01-25 16:49:47 -07:00
Mark Young
01ec17c03f BUILD: Moved 64-bit source dir back to build from build64.
Moved 64-bit source dir back to build from build64 to be backwards compatible.
2016-01-25 11:01:48 -07:00
Mark Young
ecf2a09f12 Win32: Get 32-bit Windows build working
Also includes changes to allow simultaneous 32-bit and 64-bit Windows builds.
2016-01-25 11:01:48 -07:00
GregF
1ccbcd0444 rendertests: switch gl_VertexID to gl_VertexIndex 2016-01-21 10:05:20 -07:00
Jon Ashburn
15831873cb header: move to version 1.0.1 2016-01-12 11:33:55 -07:00
Jeremy Hayes
e67d1b17d1 loader: update linux version to 1. 2016-01-12 09:44:04 -07:00
David Pinedo
84c5a14012 Tests: fix misspelling of vktracereplay.ps1 test 2016-01-11 16:29:55 -07:00
Jon Ashburn
a0673ab4a3 misc: Move to Vulkan header version 0.222 2016-01-11 13:19:10 -07:00
Mark Lobodzinski
514934b8e6 tests: Fold run_all_tests scripts into run_all_tests_with_layers scripts
Missing functionality was moved into the -with-layers scripts to ensure
all tests are run.
2016-01-08 11:39:59 -07:00
David Pinedo
72510ed667 tests: fix screenshot layer name in vktracereplay script 2016-01-07 14:54:42 -07:00
Jon Ashburn
21ab812b10 misc: Remove the unique_objects layer from being enabled in tests and demos 2016-01-07 11:58:02 -07:00
Tobin Ehlis
eee3c963bd layers: Add UniqueObjects layer to wrap objects in unique ptr
This layer should sit at the BOTTOM of the layer stack (closest to the driver, furthest from the app). It interecpts all created non-dispatchable-objects and wraps them in a struct, returning that struct ptr up the chain.

For all API calls that use NDOs, this layer will unwrap them, and overwrite the wrapped handle with the actual handle before passing it down. Then, after calling down to the driver, the layer will re-overwrite the NDO handles with the original, wrapped handle.

When an NDO object is destroyed, the actual handle is passed down, then the wrap struct object is destroyed.
2016-01-07 11:57:31 -07:00
Mark Lobodzinski
0b9032b287 layers: MR108, Merge related updates and fixes
Also removed obsolete query test case from vkbase test
2016-01-07 10:19:36 -07:00
David Pinedo
54e6cb8e0c Bump Windows ABI to 1 2016-01-06 16:38:22 -07:00
Tony Barbour
6ded0acbed tests: Bring shaders up to version 400 2016-01-06 10:12:08 -07:00
Mark Lobodzinski
a76c80cf42 tests: Modify vkMapMemory calls to use VK_WHOLE_SIZE
Calls were still using zero to map entire allocation which caused validation issues.
2016-01-05 15:32:40 -07:00
Jon Ashburn
0e64ba2e71 misc: Changes to go to header v214 including vulkan.h version update 2015-12-31 09:30:03 -07:00
Jon Ashburn
95fa686682 misc: rename startXXX to firstXXX and add firstXXX param to setviewport/scissor
Header file changes going to 213 version
2015-12-31 09:30:03 -07:00
Mark Lobodzinski
e4f3413ebe layers: Rename Layer/library/json files for consistency
Renamed layers from (for example) xxx_DrawState to xxx_draw_state
Renamed JSON files
Renamed libraries
Renamed object_track.* to object_tracker.*
Renamed apidump.h to api_dump.h
Renamed screen_shot layer to screenshot
Renamed APIDump layer settings file options to ApiDump
Bug fixes here and there from prior renames
2015-12-30 15:44:19 -07:00
Courtney Goeltzenleuchter
725db94293 debug_report: rename object type and error bits
Conflicts:
	demos/tri.c
	layers/device_limits.cpp
	layers/draw_state.cpp
	layers/image.cpp
	layers/mem_tracker.cpp
	layers/param_checker.cpp
	layers/vk_layer_logging.h
	loader/debug_report.c
	tests/layer_validation_tests.cpp
2015-12-17 11:26:03 -07:00
Tony Barbour
7ee8ea4f20 Remove FindPkgConfig from Windows build to stop error messages 2015-12-16 15:07:14 -07:00
Courtney Goeltzenleuchter
eb22bec01c layers: Rename DebugReport flags
Conflicts:
	layers/mem_tracker.cpp

Conflicts:
	layers/draw_state.cpp
2015-12-15 09:03:33 -07:00
Tobin Ehlis
8fb81982e2 layers: MR75, Merge DrawState and ShaderChecker into DrawState layer
This is the initial "dumb" merge where a few data structures are now duplicated
within DrawState. This is intentional to simplify the transition and a follow-on
commit will fix these inefficiencies.

Conflicts:
	layers/draw_state.cpp
2015-12-07 14:36:49 -07:00
Mark Lobodzinski
c8c493fa64 tests: Update layer names in run_all_tests_with_layers scripts 2015-12-01 10:26:04 -07:00