platform/upstream/Vulkan-Tools.git
6 years agolayers: Add GetImgSubrscLayout multi-planar VUIDs
Dave Houlton [Fri, 19 Jan 2018 19:17:05 +0000 (12:17 -0700)]
layers: Add GetImgSubrscLayout multi-planar VUIDs

Adds new VUIDs defined in the VK_KHR_sampler_ycbcr_conversion
extension to vkGetImageSubresourceLayouts(), and corrects the
false positive error reported in GH issue #2350.

Change-Id: Ia2814291291c7109fabd33af6119a9209e08dd51

6 years agoloader: Fix enabling extensions from layers
Lenny Komow [Wed, 17 Jan 2018 20:53:59 +0000 (13:53 -0700)]
loader: Fix enabling extensions from layers

This resolves a bug where it was impossible to enable an extension
that was defined in a layer if that layer was not passed by the
application. This applied to implicit layers, explicit layers enabled
by environment variables, and metalayers.

Change-Id: I03bee6fb778936d970f78b9142679654424f80ae

6 years agotests: Add validation for layout lifetime issues
John Zulauf [Wed, 17 Jan 2018 18:23:49 +0000 (11:23 -0700)]
tests: Add validation for layout lifetime issues

Add unit tests for valid usages that flag when descriptor set update
operations are being performed with descriptor sets create from
destroyed descriptor set layouts. The tests use overloaded VUIDs
(generic "must be valid * handles) which need to be replaced (and
unclaimed) with specific ones when they are added to the spec.

    VALIDATION_ERROR_15c00280 (write dst must be valid) ->
            write dst created from destroyed layout
    VALIDATION_ERROR_03207601 (copy dst must be valid) ->
            copy dst created from destroyed layout
    VALIDATION_ERROR_0322d201 (copy src must be valid) ->
            copy src created from destroyed layout

Change-Id: Ic37a745120899c072e2e5d8ceb96c5d93074355e

6 years agolayers: Add validation for destroyed layouts
John Zulauf [Wed, 17 Jan 2018 18:06:34 +0000 (11:06 -0700)]
layers: Add validation for destroyed layouts

Add three tests to flag with descriptor set update operations are being
done to descriptor sets with destroyed descriptor set layouts. The tests
use overload VUID (generic "must be valid * handles) which need to be
replaced with specific ones when they are added to the spec.

VALIDATION_ERROR_15c00280 (write dst must be valid) ->
write dst created from destroyed layout
VALIDATION_ERROR_03207601 (copy dst must be valid) ->
copy dst created from destroyed layout
VALIDATION_ERROR_0322d201 (copy src must be valid) ->
copy src create from destroyed layout

Change-Id: I8a3edc67b3e86037cdaa6353176814abfddef1a0

6 years agolayers: Add printf style formatting of std::string
John Zulauf [Wed, 17 Jan 2018 18:00:22 +0000 (11:00 -0700)]
layers: Add printf style formatting of std::string

Added utility for formatting output to std::string, using sprintf style
arguments.

Change-Id: Ib95fb55f38cc85a1b24cf6aac7761fc9b7c67376

6 years agolayers: clang-format parameter_validation_utils.cpp
Dave Houlton [Wed, 17 Jan 2018 17:13:33 +0000 (10:13 -0700)]
layers: clang-format parameter_validation_utils.cpp

Change-Id: I3ade2b8c7dc63f0b902b17d8cc3f9c48ca21fb23

6 years agotests: Add tests for CmdDispatch params
Dave Houlton [Tue, 16 Jan 2018 21:56:08 +0000 (14:56 -0700)]
tests: Add tests for CmdDispatch params

Change-Id: I087f412f3eccd02f040936d917eeea057e55407e

6 years agolayers: Add group size param checks to CmdDispatch
Dave Houlton [Fri, 12 Jan 2018 00:09:16 +0000 (17:09 -0700)]
layers: Add group size param checks to CmdDispatch

Added parameter validation checks to group size parameters against
device limits, for vkCmdDispatch() and vkCmdDispatchBaseKHX().

Change-Id: Ic41031d694c6d311431fc49f48b1427a2b042337

6 years agolayers: Fix doc validation file list check
John Zulauf [Tue, 16 Jan 2018 22:32:45 +0000 (15:32 -0700)]
layers: Fix doc validation file list check

The check for required files was counting the files multiple times and
aborting silently.  The check now correct counts files and exits with
non-zero exit code on failure.

Change-Id: I5b158f7cca0dd541571d95c00c3450139daf32c4

6 years agoheader: Update to version 1.0.68 of the Vulkan hdr
Mark Lobodzinski [Tue, 16 Jan 2018 17:40:16 +0000 (10:40 -0700)]
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

6 years agoloader: Clean up mutexes on destruction
Lenny Komow [Mon, 15 Jan 2018 22:43:36 +0000 (15:43 -0700)]
loader: Clean up mutexes on destruction

Change-Id: I7d1524da9167a576420c109ebbce8ebb5121cad0

6 years agoLoader: fix open registry handle leak
Slawomir Cygan [Tue, 16 Jan 2018 16:17:07 +0000 (17:17 +0100)]
Loader: fix open registry handle leak

Each handle returned by RegOpenKey*() API functions should be
closed using RegCloseKey().

This change fixes AppVerifier warning on leaklin HKEY objects.

6 years agolayers: Add checks for extention DynamicViewports
Jeremy Kniager [Wed, 15 Nov 2017 20:27:03 +0000 (13:27 -0700)]
layers: Add checks for extention DynamicViewports

Change-Id: I2819d47ab163519689ece94535c6c880f275bf72

6 years agoRevert "MikeW's private development tools."
Mike Weiblen [Tue, 16 Jan 2018 18:54:01 +0000 (11:54 -0700)]
Revert "MikeW's private development tools."

This reverts commit b103ee6a86b3296c4db52598d77ce792127a6082.

6 years agoRevert "TEST: Create pre-instance intercept test case"
Mike Weiblen [Tue, 16 Jan 2018 18:53:43 +0000 (11:53 -0700)]
Revert "TEST: Create pre-instance intercept test case"

This reverts commit 6cc77123f101f88d246a8cbdf85cc601b5fde82c.

6 years agobuild: Fix linux 32-bit assembly config
Lenny Komow [Mon, 15 Jan 2018 21:56:08 +0000 (14:56 -0700)]
build: Fix linux 32-bit assembly config

This fixes a bug whereby 32-bit Linux builds would not be able to
use the assembly code as the try_compile command would fail when it
attempted to link with compiler flags

Change-Id: I6e4479fb7926169a7fa5c01876834cdae8c3b637

6 years agobuild: Use DevSim from a VulkanTools build in CI
Karl Schultz [Fri, 12 Jan 2018 21:41:55 +0000 (14:41 -0700)]
build: Use DevSim from a VulkanTools build in CI

- Change Travis-CI to build VulkanTools and use the resulting
  DevSim binary instead of the one checked into the repo.
- Delete the DevSim binary and JSON file from layers/linux.
- Remove CMake rules related to DevSim binary.

6 years agolayers: Fix Android build
Yuly Novikov [Fri, 12 Jan 2018 23:54:12 +0000 (18:54 -0500)]
layers: Fix Android build

ndk-bundle/sources/cxx-stl/llvm-libc++/include/set
expects comparator's operator() to be const.

6 years agolayers: Fix typos in ValidateUpdateDescriptorSets
Artem Kharytoniuk [Fri, 12 Jan 2018 13:17:41 +0000 (14:17 +0100)]
layers: Fix typos in ValidateUpdateDescriptorSets

6 years agolayers: Make bind more robust to invalid memory
John Zulauf [Thu, 11 Jan 2018 23:39:30 +0000 (16:39 -0700)]
layers: Make bind more robust to invalid memory

Added nullptr check to BindBufferMemory and BindImageMemory validation
to cope with invalid memory arguments (reported elsewhere).

Change-Id: I52266490ccfe9eff7d5f451cddc4d3bbf94b3c5d

6 years agotests: Add buffer creation zero size test
Petr Kraus [Thu, 11 Jan 2018 20:59:39 +0000 (21:59 +0100)]
tests: Add buffer creation zero size test

6 years agotests: Add mipLevels and arrayLayers zero tests
Petr Kraus [Thu, 11 Jan 2018 20:35:45 +0000 (21:35 +0100)]
tests: Add mipLevels and arrayLayers zero tests

6 years agotests: Update CreateImageLimitsViolationMinWidth
Petr Kraus [Fri, 5 Jan 2018 03:30:57 +0000 (04:30 +0100)]
tests: Update CreateImageLimitsViolationMinWidth

- add descriptions
- simplify param selection (format, usage)
- test all possible cases, not just width
- update vuids (fix on unexpected msg)

6 years agolayers: Make ValidateGreaterThan report vuid etc.
Petr Kraus [Fri, 5 Jan 2018 03:05:12 +0000 (04:05 +0100)]
layers: Make ValidateGreaterThan report vuid etc.

- make ValidateGreaterThan report proper vuid and other log_msg
parameters
- make ValidateGreaterThanZero to avoid having to convert common 0
literal (for template deduction)
- update check and remove redundant ones in core_validation

6 years agotests: add tests for descriptor limit VUs
Dave Houlton [Mon, 8 Jan 2018 21:06:35 +0000 (14:06 -0700)]
tests: add tests for descriptor limit VUs

Add per-stage limit check for input attachments to existing test.
Add new test for all-stages summed descriptor limits VUs.

Change-Id: I3a245f34ebaff524f1de17c0174bba63bbd0f537

6 years agolayers: add remaining descriptor limit VUs
Dave Houlton [Fri, 5 Jan 2018 22:32:02 +0000 (15:32 -0700)]
layers: add remaining descriptor limit VUs

Add 9 remaining VUs (0fe00d18...d28) that check descriptor counts
against device limits during CreatePipelineLayout(). Modify existing
tests of per-stage limits to expect additional errors when they
also exceed the summed-stage limits.

Change-Id: I75fb1554050f134c844b12670f96e3f0b3fee75c

6 years agoTEST: Create pre-instance intercept test case
Lenny Komow [Tue, 19 Dec 2017 23:22:34 +0000 (16:22 -0700)]
TEST: Create pre-instance intercept test case

This commit should NOT be merged into master as it screws up core
validation. It is useful for testing purposes, to test the pre-
instance layer functionality.

Change-Id: Id4e078aac4289a4b951da0cb85b20306c7007597

6 years agoMikeW's private development tools.
Mike Weiblen [Wed, 11 Oct 2017 19:30:05 +0000 (13:30 -0600)]
MikeW's private development tools.

These tools are not intended to be pushed to master.

Includes Makefile for Linux, .bat files for Windows.

6 years agodocs: Update loader doc for pre-instance layers
Lenny Komow [Wed, 27 Dec 2017 22:32:44 +0000 (15:32 -0700)]
docs: Update loader doc for pre-instance layers

Change-Id: I4780d36714a6a15c4c57cd0f6324f640249a9427

6 years agoloader: Add pre-instance functions for layers
Lenny Komow [Tue, 19 Dec 2017 23:38:37 +0000 (16:38 -0700)]
loader: Add pre-instance functions for layers

Allow implicit layers (not explicit) to intercept calls before an
instance has been created.

Change-Id: I41f5bb0f5a6314fbab8003ebe71059dd04afc860

6 years agobuild: Remove Mock ICD JSON file from install target
Karl Schultz [Tue, 9 Jan 2018 01:30:18 +0000 (18:30 -0700)]
build: Remove Mock ICD JSON file from install target

The mock ICD shouldn't be installed or be part of packages
that use the "make install" target to create packages.
The mock ICD shared lib wasn't added, but the JSON was.

6 years agoscripts: Default doc validator to non-verbose mode
Mark Lobodzinski [Mon, 8 Jan 2018 16:08:06 +0000 (09:08 -0700)]
scripts: Default doc validator to non-verbose mode

Change-Id: Ib62e92a3b84609df55179e4868e5030a010f712f

6 years agoscripts: Remove unused source_line_info.py
Mark Lobodzinski [Mon, 8 Jan 2018 16:00:56 +0000 (09:00 -0700)]
scripts: Remove unused source_line_info.py

Change-Id: I1e8db79c88749a9c60469f01838dd1c485061528

6 years agolayers: Make DescriptorSetLayout robust for CTS
John Zulauf [Fri, 5 Jan 2018 22:10:34 +0000 (15:10 -0700)]
layers: Make DescriptorSetLayout robust for CTS

CTS sends an invalid descriptor set that the validation tracking was not
robust to -- two binding with identical binding ID values.  After
reporting the invalid input data, the test application could crash.
Validation internal data is now created in a way that invalid data
should less easily cause program termination.

Change-Id: Ib84a5234267f7bece9be377badd22696e3633b1b

6 years agoheader: Update to version 1.0.67 of the Vulkan hdr
Mark Lobodzinski [Mon, 8 Jan 2018 15:17:24 +0000 (08:17 -0700)]
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

6 years agodocs: Updates for governance, readme
Mark Lobodzinski [Mon, 8 Jan 2018 15:05:37 +0000 (08:05 -0700)]
docs: Updates for governance, readme

Change-Id: I98fbb73d85b14560c901c86264500c927ac679b4

6 years agoAdd .vscode to .gitignore
Joey Bzdek [Fri, 5 Jan 2018 23:46:04 +0000 (16:46 -0700)]
Add .vscode to .gitignore

Metadata created by new lightweight IDE from microsoft, vscode

Change-Id: Ie250a850d190922e5666e975463d4fa96a1f270e

6 years agobuild: Allow more control in windows build script
Karl Schultz [Fri, 5 Jan 2018 00:14:31 +0000 (17:14 -0700)]
build: Allow more control in windows build script

build_windows_targets.bat now accepts 'debug' and 'release' parameters
to select the building of these configurations.

6 years agobuild: Improve update ext srcs script for better CI
Karl Schultz [Wed, 3 Jan 2018 19:50:46 +0000 (12:50 -0700)]
build: Improve update ext srcs script for better CI

Add options (--debug --release --32 --64) to the
update_external_sources.bat script so that it can
be used to build external libraries for only the
desired platform/configuration combinations.

This helps the AppVeyor CI builds by building only
the platform/configuration combination needed for the
current job.

6 years agolayers: Remove unique_objects ext list generation
Mark Lobodzinski [Wed, 3 Jan 2018 18:25:32 +0000 (11:25 -0700)]
layers: Remove unique_objects ext list generation

Change-Id: I9b958f1799f1cab76a69c4de35590745d3e7a852

6 years agolayers: Use common ext lists in unique_objects
Mark Lobodzinski [Wed, 3 Jan 2018 18:23:55 +0000 (11:23 -0700)]
layers: Use common ext lists in unique_objects

Change-Id: I6d3ac8921dcc648df606040794029733c0516eeb

6 years agolayers: Create instance & device extension lists
Mark Lobodzinski [Wed, 3 Jan 2018 18:18:31 +0000 (11:18 -0700)]
layers: Create instance & device extension lists

Added constant lists of device and instance extension names to
vk_extension_helper.h.

Change-Id: I4273aea866cbfea176a2631e04223ce92443caf0

6 years agodocs: Updated for README formatting on github
Mark Lobodzinski [Fri, 5 Jan 2018 16:04:50 +0000 (09:04 -0700)]
docs: Updated for README formatting on github

Change-Id: I774ceb555f38eff24d2b69ce83ea638f1ea53138

6 years agodocs: Additional updates and corrections
Mark Lobodzinski [Thu, 4 Jan 2018 23:12:41 +0000 (16:12 -0700)]
docs: Additional updates and corrections

Change-Id: Id2ade62aa11fb013b405e8426fdf4f90a05a48a4

6 years agodocs: Add governance doc, Update readme, contributing
Mark Lobodzinski [Thu, 4 Jan 2018 21:55:26 +0000 (14:55 -0700)]
docs: Add governance doc, Update readme, contributing

Change-Id: I92bebd8a33df564daff1b44633e79b56ffa6ae86

6 years agolayers: Add validation caching for draw/dispatch
John Zulauf [Sat, 23 Dec 2017 00:14:54 +0000 (17:14 -0700)]
layers: Add validation caching for draw/dispatch

Validation of descriptors at draw or dispatch time is now cached, s.t.
without changes that affect validity, validation checks are not
repeated.

Change-Id: I713662d00813989bf4441921456afca431d730d7

6 years agolayers: Replace iterative DS Get.* with maps/sets
John Zulauf [Fri, 22 Dec 2017 23:47:09 +0000 (16:47 -0700)]
layers: Replace iterative DS Get.* with maps/sets

Profiling indicated hot spots in DescriptorSet Get functions which
iterated in binding space to lookup values.  Replaced iterative searches
with maps/sets.

Additionally simplified construction, optimized map/set creation and
Get.* for DescriptorSet and DescriptorSetLayout.

Change-Id: Ia2948e56333d3643d4377b39e75acf4c951d558b

6 years agolayers: Add cache of memory binding set for perf
John Zulauf [Fri, 15 Dec 2017 21:35:06 +0000 (14:35 -0700)]
layers: Add cache of memory binding set for perf

Added a cache of the GetBoundMemory set to avoid its continual
regeneration at validation time.  Call appeared in profile for high
descriptor count sets.  Also cleaned-up memory binding state setting
to avoid code duplication.

Change-Id: I84beb411a83ab311d371be940e629fdb308f5458

6 years agolayers: Combine global binding start/end lookup
John Zulauf [Fri, 15 Dec 2017 21:02:06 +0000 (14:02 -0700)]
layers: Combine global binding start/end lookup

Binding start/end lookup where using two separate maps indexed on a
common key.  Combined to avoid repeated lookups.

Change-Id: I57ed71736537de5eb83fe41599a8acec9bf23d13

6 years agoicd: GetImageSubresourceLayout zeros passed layout
John Zulauf [Wed, 3 Jan 2018 15:47:35 +0000 (08:47 -0700)]
icd: GetImageSubresourceLayout zeros passed layout

Calling tests use return values from GetImageSubresourceLayout to
compute offsets in texures.  Zero'd values are safe for this usage and
add minimal overhead to icd.

Change-Id: If52cf240925d2f7a41bb22d87519a918be5eb60a

6 years agobuild: Fix application of /bigobj compile flag
Karl Schultz [Thu, 4 Jan 2018 18:16:06 +0000 (11:16 -0700)]
build: Fix application of /bigobj compile flag

Fixes #2316
Affects only Windows builds.
Need to compile code that generates large object files
with the /bigobj option in order to avoid exceeding the
default number of sections in an object file.
This change applies the /bigobj compiler option to all
configurations, rather than just Debug.
It also applies it only to selected files, instead of
all the files in the project.
Although /bigobj is now applied to Release builds,
this does not increase build time.

6 years agoUpdate android-build/cmake scripts to build with Android Studio 3.0.0+
guanghuafan [Wed, 3 Jan 2018 19:13:15 +0000 (11:13 -0800)]
Update android-build/cmake scripts to build with Android Studio 3.0.0+

6 years agoicd: Move include to header to fix clang build
Karl Schultz [Tue, 2 Jan 2018 16:10:42 +0000 (09:10 -0700)]
icd: Move include to header to fix clang build

Move include <string> to header file to fix
clang build when using libstdc++.

Fixes #2303

Change-Id: Id2fc97be7cb83fa12ee1495ef57177c0a7dad893

6 years agobuild: Retarget AppVeyor build to VS2013
Mike Schuchardt [Wed, 3 Jan 2018 17:48:34 +0000 (10:48 -0700)]
build: Retarget AppVeyor build to VS2013

Change-Id: I88665dadbac75695034a731412984edbecbf988f

6 years agoloader: Change overzealous warning to debug msg
Lenny Komow [Wed, 3 Jan 2018 17:37:54 +0000 (10:37 -0700)]
loader: Change overzealous warning to debug msg

Change-Id: Idde5f8c8f009e365bdcf1fffaffa669d0557d66b

6 years agobuild: Update BUILD.md to specify VS2013
Mike Schuchardt [Wed, 3 Jan 2018 00:07:18 +0000 (17:07 -0700)]
build: Update BUILD.md to specify VS2013

Change-Id: I7533459cd338e233aad4d81ffc3c22aa87db1937

6 years agotests: Add a guard around noexcept in vktestbinding.h
Dave Houlton [Fri, 22 Dec 2017 20:55:53 +0000 (13:55 -0700)]
tests: Add a guard around noexcept in vktestbinding.h

VS2013 does not provide 'noexcept'. Layers had multiple occurences
of a NOEXCEPT macro to protect the VS2013 build. This commit
consolidates that macro to a single location in vk_sdk_platform.h,
which is also visible to the layer tests via test_common.h.

Updates the vktestbinding.h occurences of 'noexcept' to use the
NOEXCEPT macro.

Change-Id: I38bf8c08cda6fe75de78dff69050a913b47f91b1

6 years agobuild: Remove APP_MODULES from android Application.mk
Mark Lobodzinski [Tue, 2 Jan 2018 20:09:59 +0000 (13:09 -0700)]
build: Remove APP_MODULES from android Application.mk

This option is optional if all components are to be built. Removing
this will make VulkanTools trunk merges safer and easier.

Change-Id: I4c0bb13bf23924c49bb1b3bde1eaa26de1b180df

6 years agolayers: Accept non-unique shader caps
Dave Houlton [Fri, 22 Dec 2017 19:21:50 +0000 (12:21 -0700)]
layers: Accept non-unique shader caps

Change-Id: If14c4c58a6b6df04e97f0f83d8f8eb9b26e866ad

6 years agoProper decoding for msbuild version number readout
saschawillems [Fri, 29 Dec 2017 18:31:21 +0000 (19:31 +0100)]
Proper decoding for msbuild version number readout

6 years agolayers: Change target name for devsim json
Joey Bzdek [Thu, 28 Dec 2017 20:53:49 +0000 (13:53 -0700)]
layers: Change target name for devsim json

Fixes duplicate targets in layers / layersvt for VulkanTools

Change-Id: Ieb2577454743ac085153b04b2cbb3fcb25918578

6 years agolayers: Fix git.bat fallback on Windows.
Jamie Madill [Thu, 28 Dec 2017 17:39:51 +0000 (12:39 -0500)]
layers: Fix git.bat fallback on Windows.

This fixes the external revision generator script to first try to
use 'git', then fall back to 'git.bat' if the first invocation throws
a WindowsError.

6 years agobuild: Address clang compilation warnings
Karl Schultz [Sat, 23 Dec 2017 16:16:40 +0000 (09:16 -0700)]
build: Address clang compilation warnings

6 years agoandroid: Roll back to NDK r15c
Cody Northrop [Thu, 21 Dec 2017 16:31:53 +0000 (09:31 -0700)]
android: Roll back to NDK r15c

Until we can sort out issues with NDK r16 preventing us from
completing 32-bit test runs.

6 years agoandroid: Add missing shaderc file
Cody Northrop [Wed, 20 Dec 2017 16:00:20 +0000 (09:00 -0700)]
android: Add missing shaderc file

6 years agoscripts: Scan CWD in object tracker generator.
Jamie Madill [Wed, 20 Dec 2017 19:45:11 +0000 (14:45 -0500)]
scripts: Scan CWD in object tracker generator.

This makes it more easy to locate a header in configs which have the
CWD set to something less obvious. In Chrome's case the build directory
is completely separated from the script directory.

Also reset the CWD after the header is found to keep the build intact.

This is similar to the change to the parameter validation generator.

6 years agodemos: Remove vulkaninfo dependency on DISPLAY
Petr Kraus [Wed, 13 Dec 2017 21:24:15 +0000 (22:24 +0100)]
demos: Remove vulkaninfo dependency on DISPLAY

6 years agolayers: Remove unused variable from core validation.
Jamie Madill [Sun, 3 Dec 2017 17:25:32 +0000 (12:25 -0500)]
layers: Remove unused variable from core validation.

This commit was accidentally reverted in dec37fb9172:
layers: Add descriptor limit checks to vkCreatePipelineLayout()

6 years agobuild: Add clang-format checking of pull request changes to CI
Karl Schultz [Mon, 18 Dec 2017 23:16:45 +0000 (16:16 -0700)]
build: Add clang-format checking of pull request changes to CI

Check modified lines in a pull request for correct clang-format.
Note that checking is not performed unless there is a pull request.

Heavily leveraged from https://github.com/KhronosGroup/SPIRV-Tools.

6 years agolayers: Ignore pImmutableSamplers on non-samplers
Petr Kraus [Sun, 17 Dec 2017 16:37:33 +0000 (17:37 +0100)]
layers: Ignore pImmutableSamplers on non-samplers

6 years agolayers:Kill PV return code check
Tobin Ehlis [Tue, 19 Dec 2017 16:30:04 +0000 (09:30 -0700)]
layers:Kill PV return code check

Most of these return code warnings were already removed from validation
so killing this one as well. They can potentially be re-added in an
assistant layer.

6 years agolayers: Work around bugs in old STL versions.
Jamie Madill [Fri, 15 Dec 2017 22:14:04 +0000 (17:14 -0500)]
layers: Work around bugs in old STL versions.

Some old versions of the C++ STL have a few bugs with advanced features.
This works around two such issues:

- std::unordered_map::const_reference having the wrong type
- an error with an explicit std::vector constructor

6 years agoandroid: Update to NDK r16b
Cody Northrop [Mon, 18 Dec 2017 05:05:31 +0000 (22:05 -0700)]
android: Update to NDK r16b

This allows us to switch to libc++ runtime as it is no longer beta:
https://android.googlesource.com/platform/ndk/+/ndk-release-r16/CHANGELOG.md

6 years agoscripts: Scan CWD in parameter validation script.
Jamie Madill [Fri, 15 Dec 2017 20:54:05 +0000 (15:54 -0500)]
scripts: Scan CWD in parameter validation script.

This makes it more easy to locate the header in configs which have the
CWD set to something less obvious. In Chrome's case the build directory
is completely separated from the script directory.

Also reset the CWD after the header is found to keep the build intact.

6 years agoscripts: Prefer git.bat on Windows.
Jamie Madill [Fri, 15 Dec 2017 21:25:16 +0000 (16:25 -0500)]
scripts: Prefer git.bat on Windows.

Calling git.bat seems to work in every instance, whereas some
installations don't have access to "git" directly.

6 years agodemos: GH1054, make cube shaders inline
Petr Kraus [Thu, 30 Nov 2017 13:49:20 +0000 (14:49 +0100)]
demos: GH1054, make cube shaders inline

6 years agoicd: Fix json for windows build
Petr Kraus [Thu, 14 Dec 2017 23:39:40 +0000 (00:39 +0100)]
icd: Fix json for windows build

6 years agolayers: Fix Graphics Pipeline pointers not ignored
Petr Kraus [Thu, 14 Dec 2017 19:57:36 +0000 (20:57 +0100)]
layers: Fix Graphics Pipeline pointers not ignored

Some VkGraphicsPipelineCreateInfo pointers must be ignored under some
conditions, but were not in the layers.

Add relevant tests.

Fix tests found broken (using depth or color without attachment in
subpass)

6 years agolayers: improve const-ness in buffer_validation.cpp
Dave Houlton [Thu, 14 Dec 2017 22:08:47 +0000 (15:08 -0700)]
layers: improve const-ness in buffer_validation.cpp

Change-Id: Ic7a2ef6e26b76c1b5f3a4c279e0d15228513af9e

6 years agolayers: Repro and fix GH 2239
Dave Houlton [Fri, 8 Dec 2017 20:51:02 +0000 (13:51 -0700)]
layers: Repro and fix GH 2239

Modified positive test UncompressedToCompressedImageCopy to provoke
the issue reported in GH 2239

Fixed destination extents calculations in buffer_validation.cpp to
avoid the erroneous errors

Change-Id: I268f14a6be678d767df14f0a6694aca479854c3

6 years agolayers: Fix PV overflow
Mike Schuchardt [Wed, 13 Dec 2017 16:45:36 +0000 (09:45 -0700)]
layers: Fix PV overflow

Buffer pCreateInfo->size was being truncated to uint32_t before
comparison with 0

Change-Id: Iba6b94f2a0df6514d1ffb79d38e6c0738ea44d71

6 years agolayers:Add VUID to existing check
Tobin Ehlis [Wed, 13 Dec 2017 16:39:30 +0000 (09:39 -0700)]
layers:Add VUID to existing check

Add VUID to existing check for VALIDATION_ERROR_0f6004ac and update
the DB file to reflect that this check is in place.

6 years agolayers: Add some missings locks of global_lock
Jean-François Marquis [Wed, 15 Nov 2017 22:48:48 +0000 (17:48 -0500)]
layers: Add some missings locks of global_lock

Add locks of global_lock in BindBufferMemory, BindImageMemory
and GetImageSubresourceLayout to have safe access to imageMap
and bufferMap.

6 years agoicd:Update README with current status
Tobin Ehlis [Tue, 12 Dec 2017 18:11:18 +0000 (11:11 -0700)]
icd:Update README with current status

6 years agobuild: Clear some compiler warnings
Petr Kraus [Fri, 8 Dec 2017 23:22:39 +0000 (00:22 +0100)]
build: Clear some compiler warnings

- remove unnecessary ";" after function definitions and namespaces
- fix
wrong type match in printf for handle types
- convert some left-overs to `HandleToUint64`

6 years agotests: Add tests for VUs 0fe0023c-246
Dave Houlton [Fri, 1 Dec 2017 23:07:10 +0000 (16:07 -0700)]
tests: Add tests for VUs 0fe0023c-246

Add CreatePipelineLayoutExceedsSetLimit() which tests 0fe0023c.
Add CreatePipelineLayoutExcessPerStageDescriptors() which tests
VUs 0fe0023e0fe002400fe002420fe00244 & 0fe00246.

Change-Id: I3795e6a726c10626b33bac254c396db5fb8a8e6c

6 years agolayers: Add descriptor limit checks to vkCreatePipelineLayout()
Dave Houlton [Wed, 29 Nov 2017 21:36:21 +0000 (14:36 -0700)]
layers: Add descriptor limit checks to vkCreatePipelineLayout()

Change-Id: I570dc49652997cfaed7dcd6dfaf2e6f125f861cc

6 years agoRevert "layers: Add descriptor limit checks to vkCreatePipelineLayout()"
Dave Houlton [Fri, 8 Dec 2017 22:11:05 +0000 (15:11 -0700)]
Revert "layers: Add descriptor limit checks to vkCreatePipelineLayout()"

Remove checks to avoid database complaints

This reverts commit af313b4683b42a9e4d15aa5819feddc1b9eee6d8.

6 years agoRevert "tests: Add tests for VUs 0fe0023c-246"
Dave Houlton [Fri, 8 Dec 2017 22:04:48 +0000 (15:04 -0700)]
Revert "tests: Add tests for VUs 0fe0023c-246"

This test fails on google's Vega system

This reverts commit 29cedfebcc891d85e938893166a3d919fc2845d2.

6 years agowinsdk: Move file copying into NSIS installer
Lenny Komow [Fri, 8 Dec 2017 20:52:26 +0000 (13:52 -0700)]
winsdk: Move file copying into NSIS installer

Change-Id: If01c5024af802be784d5ea0f897cebdcc604934d

6 years agotests: Add tests for VUs 0fe0023c-246
Dave Houlton [Fri, 1 Dec 2017 23:07:10 +0000 (16:07 -0700)]
tests: Add tests for VUs 0fe0023c-246

Add CreatePipelineLayoutExceedsSetLimit() which tests 0fe0023c.
Add CreatePipelineLayoutExcessPerStageDescriptors() which tests
VUs 0fe0023e0fe002400fe002420fe00244 & 0fe00246.

Change-Id: I3795e6a726c10626b33bac254c396db5fb8a8e6c

6 years agolayers: Add descriptor limit checks to vkCreatePipelineLayout()
Dave Houlton [Wed, 29 Nov 2017 21:36:21 +0000 (14:36 -0700)]
layers: Add descriptor limit checks to vkCreatePipelineLayout()

Change-Id: I570dc49652997cfaed7dcd6dfaf2e6f125f861cc

6 years agolayers: VS2013 compatibility
Mike Schuchardt [Wed, 6 Dec 2017 20:31:29 +0000 (13:31 -0700)]
layers: VS2013 compatibility

Remove all usages of constexpr to restore compatibility with Visual Studio
2013.  Also make a handful of other minor edits where the VS2013
compiler was reporting errors.

Change-Id: I3c426bea460a4a902ab306b01deb1d76d60f5fa2

6 years agobuild: Remove clumsy syntax in Travis-CI config
Karl Schultz [Wed, 6 Dec 2017 01:00:11 +0000 (18:00 -0700)]
build: Remove clumsy syntax in Travis-CI config

We were using a clumsy workaround in order to
get good failure information when a Travis-CI build
failed and also to make it stop at the point of
failure.

This commit uses some techniques to workaround
travis-ci/travis-ci#1066, which asserts that
a Travis-CI job should stop when a before_install
or script command fails.  Today, Travis-CI
continues with the next commands.

This was tested with both an intentional build
script error and a compilation error.  In both
cases the Travis-CI job ended at the point of
failure and the logs were clear enough to
diagnose the problem.

6 years agotests: Separate LogicOp test
Petr Kraus [Tue, 5 Dec 2017 02:15:18 +0000 (03:15 +0100)]
tests: Separate LogicOp test

- separate LogicOp test so it does not choose what it is testing at
runtime
- update to `CreatePipelineHelper`
- use VUIDs and update database
- should fix one of the "Unexpected" in CI

6 years agotests: Update MismatchedQueueFamiliesOnSubmit
Petr Kraus [Tue, 5 Dec 2017 20:02:48 +0000 (21:02 +0100)]
tests: Update MismatchedQueueFamiliesOnSubmit

- report clearly if it is skipped
- don't rely on test state for the pool
- use VUID and update database
- should fix one of the "Unexpected" in CI tests

6 years agotests:Add new case to ClearDepthStencilImageErrors
Tobin Ehlis [Mon, 4 Dec 2017 23:07:33 +0000 (16:07 -0700)]
tests:Add new case to ClearDepthStencilImageErrors

Add test case where VK_IMAGE_USAGE_TRANSFER_DST_BIT is not correctly
set for an image that is passed to vkCmdClearDepthStencilImage().

6 years agotests:Fix unexpected error
Tobin Ehlis [Mon, 4 Dec 2017 21:47:26 +0000 (14:47 -0700)]
tests:Fix unexpected error

Update ClearDepthStencilImageErrors test to remove unexpected error.
Updated the error check to use VUID instead of text.
Also, this is the new name of the test in anticipation of testing at
least one more error condition in this same test.

6 years agolayers:Add image checks for DS image being cleared
Tobin Ehlis [Thu, 30 Nov 2017 20:47:11 +0000 (13:47 -0700)]
layers:Add image checks for DS image being cleared

Adding checks for two new VUIDs related to vkCmdClearDepthStencilImage
function. Making sure that the image being cleared supports use as a
transfer destination and that the image was created with the usage bit
VK_IMAGE_USAGE_TRANSFER_DST_BIT.

6 years agocmake: Fix layers/icd cmake files for in-tree builds
Mark Lobodzinski [Tue, 5 Dec 2017 23:41:25 +0000 (16:41 -0700)]
cmake: Fix layers/icd cmake files for in-tree builds

See Github #2243.

Change-Id: I40119c73a1518357df4360654c888b8306aa94d8