Commit Graph

110 Commits

Author SHA1 Message Date
Karl Schultz
51f8340499 build: Enable declaration hiding warning on Windows
Fixes #1388
Turn on the Windows compiler option (4456) to report
hidden declarations.
Fix all places where this was occurring.

Change-Id: I3346d87da8b70d6299c206fcac68520a091ed1a6
2017-01-27 15:18:16 -08:00
Karl Schultz
8217f9a05a build: Turn on "treat warnings as errors" on Win
Also address compiler warnings:

- Suppress warnings for inconsistently redefined snprintf
  on Windows with Visual Studio < 2015.  Warnings for
  preprocessor redefinitions are still enabled on VS 2015
  because snprintf is not redefined on VS 2015.

- Turn off "changed behavior" warning with Visual Studio < 2015
  for using initializers in constructors.  MSFT "fixed" some
  forms of these initializers so that they clear members instead
  of just leaving them alone.  Since clearing is usually desired,
  this isn't a problem in most cases.  But if an object is
  reinstantiated on top of an existing object, via placement new
  for example, the clearing may not be desired if the first object's
  data was meant to be preserved.  We don't count on this behavior.

- Suppress linker warning for linking the loader in debug build on
  Windows.  This warning is for mismatched runtime libraries and
  causes extra code to be linked in only for debug builds.  Ignoring
  the warning is generally regarded as better than the alternatives.

Change-Id: I8b0e311d3c80a8dd9ac0cc95f764ed1123efa86f
2017-01-26 09:18:23 -08:00
Mark Lobodzinski
8c2529b90d cmake: Add common targets/rules for helper files
Change-Id: I26244eaf04451fd7c3755563953c7b8ad3715613
2017-01-23 09:48:29 -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
Karl Schultz
46d252c1cb demos: Fix CMake file to allow WSI selection
Define DEMOS_WSI_SELECTION CMake variable so it can be set
from CMake command line or GUI.

Change-Id: If2531d102fe9b054a1eee4da28431779b173fc10
2017-01-04 13:17:06 -07:00
Tony Barbour
39a0738265 demos: Make DEMOS_WSI_SELECTION a variable, not an option
Change-Id: I8e10ce8df3d569c13f0adf6c09e5bd431279bc2d
2016-12-09 13:16:28 -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
7fc644d709 Demos: Add DEMOS_WSI_SELECTION to pick Linux wsi to use
Change-Id: Ic1fcc6cf888d94b84a43661aa33815948d85b701
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
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
Lenny Komow
ca76234922 build: Allow the use of a custom-named vulkan dll
Change-Id: Ibeae30386ca2a91717d6b4c3039ada884003a1a4
2016-11-08 09:07:28 -07:00
John Zupin
41474df38d build: Update cmake files to use variables as destinations for make install
Change-Id: Ic1d6ebdb73e796cbb1207963973e410c9928c04f
2016-10-27 17:14:46 -06:00
Dor Askayo
24cb38c880 loader: fix duplicate detection of manifests when CMAKE_INSTALL_PREFIX is defined
This commit fixes GH-1084. (see the issue for more details)

Note that this adds /usr/local/etc and /usr/local/share to the
loader's search path for drivers and layers.

Change-Id: I2cf502cc7d905225c8d38383ea6f856a4daed3ea
Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
2016-10-27 16:32:50 -06:00
Dor Askayo
f61d06c185 loader: use CMAKE_INSTALL_FULL_<dir> to improve Linux filesystem compatibility
In order to improve the loader's compatibility with different filesystem hierarchies
under Linux, use CMake's CMAKE_INSTALL_FULL_<dir> instead of CMAKE_INSTALL_<dir> to
correctly resolve the absolute paths of SYSCONFDIR and DATADIR in compliance with
the GNU Coding Standard [1] and Linux Foundation's Filesystem Hierarchy Standard [2],
as explained in CMake's documentation [3].

Note to packagers: When using CMAKE_INSTALL_PREFIX, this commit obviates the
definition of other CMAKE_INSTALL_ defines to properly detect ICD and layer
manifests in GNU/Linux-compliant filesystems.

This commit fixes GH-1083. (see the issue for more details)

[1] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
[2] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
[3] https://cmake.org/cmake/help/v3.4/module/GNUInstallDirs.html

Change-Id: If743a3c8f5f7381e00c0d23b95b9e13c0dead144
Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
2016-10-27 16:30:07 -06:00
Karl Schultz
d40671ef63 build: Add include files to make install target
Change-Id: Ieaf84adc4a9345c1f5ef7646106dd00ff3e5e716
2016-10-12 17:36:35 -06:00
Raul Tambre
d70dabbbb0 Fix CMake modules not being added correctly
This allows this project to be more easily included as a
sub-project of another project.

Change-Id: I098f26707f17d20353c91a4adb7bfb83d90a99fa
2016-10-03 10:31:49 -06:00
Mark Lobodzinski
8975bc4ccd cmake: Fix whitespace
Change-Id: Ia2d35a87c14c0c73bc26588694b398e04a191203
2016-09-29 10:28:22 -06:00
Norbert Nopper
2233bb009b Fix, that display only build under Linux works 2016-09-12 11:55:47 -06:00
Mark Young
92307a6def build: update spirv and glslang revisions
Updated to more recent SPIRV, SPIRV_headers, and glslang commits.
This also required updating the overall build to use a new
library SPVRemapper.lib.

Change-Id: I47573be7a1fe62c519f504920590ceb6510a7a13
2016-08-26 16:54:43 -06:00
Tony Barbour
088c5f98d3 demos: Restore Wayland compile behavior in cube
And document supported configurations

Change-Id: Ib6cdccf48c75373acfc2ebe625719360caa16657
2016-08-25 13:49:10 -06:00
davidhubbard
3505577dea build: pr787 - CMAKE_INSTALL_PREFIX default
CMAKE_INSTALL_PREFIX default is /usr/local on unix

In order to build with a custom CMAKE_INSTALL_PREFIX, the line
set (CMAKE_INSTALL_PREFIX "") must be removed.

CMake set will overwrite anything specified on the command
line with cmake -DCMAKE_INSTALL_PREFIX.

Change-Id: I3bc905b4ad8fb08917e500e4987eb0277ba74a40
2016-08-04 13:02:08 -06:00
Karl Schultz
1ac14a5f58 build: Update glslang to e4821e
This includes applying a patch to glslang to revert glslang
commit a5c33d, which fixes a texel fetch problem that many IHV
drivers are not ready to cope with yet.
2016-07-18 11:19:22 -06:00
Alexander F Rødseth
f248328ca0 Only set scripts that starts with a hashbang as executable
Remove executable bit from files like README.md

Change-Id: I6a2a86e8312616c175845f0a3b777515a58c52b9
2016-06-17 10:46:10 -06:00
Mark Young
ac296688ae build: Fix typos in CMakeLists.txt (SPRIV->SPIRV)
Change-Id: I6a2b685cea8cda1fde5ae40a0beaa04f1319c6a3
2016-06-16 14:57:25 -06:00
Karl Schultz
2381209c41 build: Disable RTTI generation
Disablng RTTI can save a little space.  And it will help keep
some C++ features from being used that are not (well) supported
on some platforms.

Change-Id: I8050009a65de640c2e41cdefb1ead43c88bb710a
2016-05-12 10:31:44 -06:00
Mark Mueller
3f7404b513 CMakeLists.txt and doc changes for
1) Ninja build and QTCreator IDE support
2) Out of tree builds that aren't based on using update_external_sources and build_windows_target scripts
3) Allowing the developer to use non-default locations for glslang and SPIRV-Tools binaries and sources
4) Fix linux build when developer chooses not to rename SPIRV-Tools to spirv-tools

Change-Id: Ib6118c47dc780e6721ec0538aae1a6ee444eed78
2016-05-05 09:38:09 -06:00
Jon Ashburn
95456f9d24 external: GH#246, Move glslang and spirv-tools inside of dir tree
Have update_external_sources create a sub-directory "external" to
fetch these components into. This way the update_external_sources
does not potentially overwrite files outside the directory tree.

Change-Id: Ia03d1fb9e4dad9d9db26a46e596fb1bf24fcb033
2016-05-03 11:37:09 -06:00
Cody Northrop
dc7a90c31b toolchain: Bump everything to pull in required SPIR-V tools revision
Encompasses pull request #261 from Chris.

Also gets things building again reflecting upstream changesi, mainly
HLSL libs for glslang.

Desktop build/test results w/ update_external_sources.sh/bat
 Windows on Skylake: _run_all_tests.ps1, demos with --validate
 Ubuntu on Skylake: vk_layer_validation_tests, cube --validate

Android build/test results w/ update_external_sources_android.sh/bat:
 Windows: VkLayerValidationTests pass
 OSX: VkLayerValidationTests pass
 Ubuntu: VkLayerValidationTests pass
2016-04-22 13:21:47 -06:00
Tony Barbour
1e7f07c81d layers: Include all 4 Linux WSI interfaces
Change-Id: I20b0d64c90e6da940f45b31abf0330b2a415655d
2016-04-13 15:33:04 -06:00
GregF
eeaa12874d SPIRV: Adjust to spirv-tools library move 2016-04-01 14:20:14 -06:00
Tony Barbour
2436fafcfc Turn off XLIB define
Defining XLIB causes generated layers to silently fail to load

Change-Id: Id630465507383bd61e4e80c184e991ca8e9a1ac8
2016-03-31 13:23:56 -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
Jon Ashburn
fa59d01e85 build: Enable Xlib support to default ON on Linux builds
Change-Id: I5a89e81caf31b6cc5a5f0668a97fb05e8e6462aa
2016-03-08 10:04:06 -07:00
Karl Schultz
b3f11166b1 build: Fix CMake Xlib DisplayServer name.
Change-Id: Ia50157cd4f245971208a1baa28c823a62683dcd3
2016-03-08 08:07:13 -07:00
Tony Barbour
ff4013c77c LX #410 - Use ${PYTHON_EXECUTABLE} for PYTHON_CMD 2016-03-02 09:33:14 -07:00
Mun, Gwan-gyeong
66e60cfa3b cmake: GH PR17, Add DisplayServer variables for the WSI interfaces 2016-02-29 08:27:10 -07:00
Tony Barbour
efd8b0d6a9 demos: Add Hologram snapshot as Smoke test/demo 2016-02-26 13:53:07 -07:00
Jason Ekstrand
3bfebc9ed4 loader: Fix Wayland support
All that was needed was to fix some misplaced braces, fix a couple of
copy+paste problems from Mir, and add a lookup function.  Getting Mir
support working should be pretty easy.

Conflicts:
	layers/swapchain.cpp
2016-02-22 07:48:15 -07:00
Jason Ekstrand
9bc802e866 cmake: Add options for each of the linux wsi interfaces
We default everything except XCB to off since that is the only one that has
been well-tested up to now.
2016-02-22 07:36:29 -07:00
Jon Ashburn
72e7b8bce0 misc: Remove vktrace and icd from this repository 2016-02-02 14:38:08 -07:00
Antoine Labour
fd09b505fc vkjson: initial commit 2016-01-20 15:36:25 -07:00
David Pinedo
54e6cb8e0c Bump Windows ABI to 1 2016-01-06 16:38:22 -07:00
Tony Barbour
7ee8ea4f20 Remove FindPkgConfig from Windows build to stop error messages 2015-12-16 15:07:14 -07:00
Mark Lobodzinski
574a6ffa1e wsi: Do not enable Xlib support by default 2015-12-15 13:53:57 -07:00
Mark Lobodzinski
1ad14b4bfd wsi: Make WSI cases more consistent, fail if not set correctly
Filled in build details for Mir, Wayland, etc.
2015-12-11 15:32:58 -07:00
FslNopper
5599b91eef Fixes, that build is possible with Xlib configuration. 2015-12-04 16:17:45 -07:00
Mark Lobodzinski
6be1a0d17d wsi: Various fixes and Windows build issues 2015-12-01 10:26:05 -07:00
Mark Lobodzinski
80aff7430c vktrace: Renable trace/replay builds by default 2015-12-01 10:26:05 -07:00
Mark Lobodzinski
06e36268c2 wsi: Moved definition of CreateXxxSurface extension to CMakefile
Removed component-specific definitions
2015-12-01 10:26:04 -07:00