platform/upstream/Vulkan-LoaderAndValidationLayers.git
6 years agotests: Add unit tests for dedicated memory binding
John Zulauf [Fri, 2 Mar 2018 16:24:43 +0000 (09:24 -0700)]
tests: Add unit tests for dedicated memory binding

Added unit tests for the following valid usage checks w.r.t. binding
dedicated allocations to buffers and images.

VALIDATION_ERROR_17000bc8 VUID-vkBindBufferMemory-memory-01508
VALIDATION_ERROR_17400bca VUID-vkBindImageMemory-memory-01509

As same code path checks the BindImage2/BufferMemory2, but has no
matching valid usage, no tests are added for those cases.

Change-Id: Id8845d3cdb85731142ca0dca381a5e9157118a25

6 years agolayers: Add VU checks for dedicated buffers/images
John Zulauf [Fri, 2 Mar 2018 16:13:09 +0000 (09:13 -0700)]
layers: Add VU checks for dedicated buffers/images

Add validation for the following valid usage for binding dedicated
allocations to buffers and images.

VALIDATION_ERROR_17000bc8    VUID-vkBindBufferMemory-memory-01508
VALIDATION_ERROR_17400bca    VUID-vkBindImageMemory-memory-01509

The same code path checks the BindImage2/BufferMemory2, but there are no
matching VUID at this time.

Change-Id: I8b700059d8c0acdfabf0b30be3dca20f616b3be1

6 years agomacOS: Add macOS support
Karl Schultz [Tue, 12 Dec 2017 15:33:01 +0000 (10:33 -0500)]
macOS: Add macOS support

6 years agolayers:Add VUIDs for VK_KHR_incremental_present
Tobin Ehlis [Fri, 2 Mar 2018 14:43:50 +0000 (07:43 -0700)]
layers:Add VUIDs for VK_KHR_incremental_present

Ran across this old TODO when cleaning up branches. Add in the
appropriate VUIDs, update DB, and kill TODO comment.

6 years agobuild: Fix -Wmicrosoft-cast warnings with clang-cl
Nico Weber [Thu, 1 Mar 2018 14:55:46 +0000 (09:55 -0500)]
build: Fix -Wmicrosoft-cast warnings with clang-cl

MSVC allows implicit conversion from function pointers to void*.
The C++ standard doesn't allow this, and clang-cl emits a warning
when this is done.  This change fixes these warnings in
Vulkan-LoaderAndValidationLayers.

Arguably, loader_platform_get_proc_address() should return a
FARPROC so that the compiler can help checking calling conventions,
but this is the simplest fix that unblocks us.

This is needed for https://crbug.com/550065

6 years agotests: Add tests for vkCmdSetScissor
Petr Kraus [Tue, 27 Feb 2018 20:20:23 +0000 (21:20 +0100)]
tests:  Add tests for vkCmdSetScissor

+ increase coverage of `VkRect2D` tests.

6 years agolayers: Rewrite pv_vkCmdSetScissor checks
Petr Kraus [Tue, 27 Feb 2018 20:15:55 +0000 (21:15 +0100)]
layers: Rewrite pv_vkCmdSetScissor checks

- tweaks to completeness, correctness and quality of msg logs
- add `multiViewport` related check
- protect against `NULL`  ptr `pScissors`
- make overflow check more robust (remove u32->i32 cast)
- correct veid db

6 years agotests: Add missing dyn. multiVieport tests in db
Petr Kraus [Tue, 27 Feb 2018 20:00:14 +0000 (21:00 +0100)]
tests: Add missing dyn. multiVieport tests in db

6 years agolayers: Conform to gstyle in pv_vkCmdSetVieport
Petr Kraus [Tue, 27 Feb 2018 19:51:20 +0000 (20:51 +0100)]
layers: Conform to gstyle in pv_vkCmdSetVieport

6 years agolayers: Make unique_objects ID map global
Mark Lobodzinski [Wed, 28 Feb 2018 20:38:45 +0000 (13:38 -0700)]
layers: Make unique_objects ID map global

Increasingly, instance objects are referenced by device-level APIs.
Made unique ID map global, shared across all instances and devices.

Change-Id: I5b62e7b95ec25a2a8b390d46024b43c29f2199ce

6 years agoscripts: Mod spec.py to use local validusage.json
Mark Lobodzinski [Thu, 1 Mar 2018 17:25:58 +0000 (10:25 -0700)]
scripts: Mod spec.py to use local validusage.json

This script by default used the latest version of validusage.json from
the web. Changed to use the local copy checked into the repo. Used the
json-file option to fetch from a non-default location, removed the
-json arg and the URL option entirely.

Change-Id: Id088b08c8e66a3cdfca2b9e771797bffe941e5d3

6 years agoscripts: Add validusage.json to LVL repo
Mark Lobodzinski [Tue, 27 Feb 2018 16:19:15 +0000 (09:19 -0700)]
scripts: Add validusage.json to LVL repo

In the future, this file will be updated as part of the Vulkan
header update process, and will be used as part of managing VUID
identifiers and lifetimes.

Change-Id: I6e29c1148e8752147310649a5ccfd99f385c0f46

6 years agolayers: Add VU check for VkSwapchainCreateInfoKHR
Jeremy Kniager [Fri, 19 Jan 2018 17:55:01 +0000 (10:55 -0700)]
layers: Add VU check for VkSwapchainCreateInfoKHR

Added validation check for zero values in
imageExtent of VkSwapchainCreateInfoKHR.

No test included for this VU check as there is
currently no clean method for creating a
VkSurfaceKHR object in
layer_validation_tests.cpp.

Change-Id: I5b04543a837d1f1f7d8c20cec4f446df503a81ce

6 years agodemos: Fix bug cube.c
Jeremy Kniager [Fri, 19 Jan 2018 17:52:34 +0000 (10:52 -0700)]
demos: Fix bug cube.c

Fixed cube.c crashing on Windows when minimized.

Change-Id: Ia4a6578f7da6c1f7a10977b8343099df4c5c69fb

6 years agodemos: Redirect error messages to stderr
Shannon McPherson [Wed, 28 Feb 2018 17:59:22 +0000 (10:59 -0700)]
demos: Redirect error messages to stderr

Change-Id: Ib704cdc15eb681d1aa1c0a6cde55af5a9bdf3f0e

6 years agotests: Clean cmath and climits usage
Petr Kraus [Tue, 27 Feb 2018 16:02:32 +0000 (17:02 +0100)]
tests: Clean cmath and climits usage

- remove usage of `limits.h` that should not have existed
- merge the two separate handling of `nextafter` direction
- remove workaround for `cmath` impls with missing `std::`

6 years agolayers:Merge common loops
Tobin Ehlis [Mon, 26 Feb 2018 17:55:57 +0000 (10:55 -0700)]
layers:Merge common loops

Can increment resources for secondary command buffers in the same loop
where image layouts are updated.

6 years agotests: Fix #2440 -- add missing math.h include
Petr Kraus [Tue, 27 Feb 2018 13:48:40 +0000 (14:48 +0100)]
tests: Fix #2440 -- add missing math.h include

6 years agodocs: fix markdown lint issues in BUILD.md
Karl Schultz [Tue, 27 Feb 2018 17:47:00 +0000 (10:47 -0700)]
docs: fix markdown lint issues in BUILD.md

6 years agodocs: Remove osx-specific func from Linux instrs
Mark Lobodzinski [Wed, 21 Feb 2018 22:31:52 +0000 (15:31 -0700)]
docs: Remove osx-specific func from Linux instrs

Fixed a pre-existing typo in the android instructions for Linux.

Change-Id: I7ceea88d07a69a60fc1afe4b2facf3e03f0da0e5

6 years agodocs: Reorg and update BUILD.md
Mark Lobodzinski [Mon, 19 Feb 2018 23:31:41 +0000 (16:31 -0700)]
docs: Reorg and update BUILD.md

Also changed to one-sentence-per-line markdown style.

Change-Id: I41d6fcb8fa4a07711f19325c350950d5be3e269c

6 years agolayers: Removed obsolete (and duplicate) VUIDs
Mark Lobodzinski [Mon, 26 Feb 2018 23:09:11 +0000 (16:09 -0700)]
layers: Removed obsolete (and duplicate) VUIDs

Removed old source, tests, and database entries for checks 09c0012a
and 09c00136 (VUID-VkImageCopy-srcSubresource-00149 and
VUID-VkImageCopy-dstSubresource-00155) which were removed as part
of gitlab issue #812.

Change-Id: I8da71e2dc5b993a442ae1c4f6036266b59069a4f

6 years agolayers: Fix a couple of old typos
Mark Lobodzinski [Mon, 26 Feb 2018 23:01:22 +0000 (16:01 -0700)]
layers: Fix a couple of old typos

Change-Id: I05d9c71a21136b790039fce05a2b4d9472537a2a

6 years agolayers: Remove buffer image_xfer_granularity checks
Mark Lobodzinski [Mon, 26 Feb 2018 22:57:35 +0000 (15:57 -0700)]
layers: Remove buffer image_xfer_granularity checks

These checks are obsolete and have been removed from the spec.

Change-Id: If0c47096029775c53493ba2a5b3d3ee58211f4b3

6 years agotests: Remove buffer image_xfer_granularity tests
Mark Lobodzinski [Mon, 26 Feb 2018 23:19:05 +0000 (16:19 -0700)]
tests: Remove buffer image_xfer_granularity tests

Change-Id: Ibc45453a921f4e2088b0093b3e330038c25e23fd

6 years agobuild: Fix line endings in update resources script
Jeff Bolz [Wed, 14 Feb 2018 20:26:18 +0000 (14:26 -0600)]
build: Fix line endings in update resources script

Used tr -d to remove line endings for external_revisions files in
update_external_sources.sh script.

Note: Also fixed comment

Change-Id: I9a467d60acc27eeced1f48e46c3bc5624c47ab23

6 years agolayers: Record 3D image slice layouts
Dave Houlton [Thu, 22 Feb 2018 23:25:16 +0000 (16:25 -0700)]
layers: Record 3D image slice layouts

Fixes a bug in image layout state handling that appeared with
khr_maintenance1. When a 3D image which was created with the
VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR flag is transitioned
between layouts, we now also record a transition for each depth
slice, treating it as an array layer subresource.

The actual fix is just two lines within TransitionImageLayouts().
Also included are some debug-enabling refactoring to distinguish
layout state updates vs additions, and support for new aspect
mask bits.

Change-Id: Ibb5131a6dba8fcdeafe5e6d94af2decf751842ec

6 years agobuild: Modify .gitattributes for unix line endings
Mike Weiblen [Fri, 23 Feb 2018 20:26:08 +0000 (13:26 -0700)]
build: Modify .gitattributes for unix line endings

Shell scripts were forced to a carriage-return line ending -- changed
this to a line feed line ending.

Change-Id: I98b738e4f09ccc622632194586435e5ee6d855eb

6 years agolayers: Fix dev-profile test layer dest loc
Mark Lobodzinski [Fri, 23 Feb 2018 18:02:09 +0000 (11:02 -0700)]
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

6 years agotweak travis config to make it easier to see which profile is failing
Chris Forbes [Fri, 23 Feb 2018 18:16:17 +0000 (10:16 -0800)]
tweak travis config to make it easier to see which profile is failing

6 years agolayers: Fix miscounting of descriptors for multiple stages
Chris Forbes [Fri, 23 Feb 2018 17:11:06 +0000 (09:11 -0800)]
layers: Fix miscounting of descriptors for multiple stages

Descriptors are not intended to count multiple times against the
maxDescriptorSet* limits if they are accessible from multiple stages.

Required adjusting various subtests in CreatePipelineLayout*.

Also fixed some related issues in those tests:
- Input attachments are ONLY accessible to the fragment stage.
- Various assumptions about divisibility of the maxDescriptorSet* limits

There are still many robustness issues in these tests -- it appears we
don't hit them with real implementations, but still wrong.

6 years agolayers: Fix validation of shader pipelines when a stage is broken
Chris Forbes [Sat, 17 Feb 2018 00:59:23 +0000 (16:59 -0800)]
layers: Fix validation of shader pipelines when a stage is broken

Present-but-broken stages need to still be considered present for
the purposes of walking `producer` forward. Otherwise a broken GS will
for example cause us to get confused and try to match the VS interface
against the FS.

Bug: #1600, others.

6 years agodemos: Clang format and update const correctness
Shannon McPherson [Tue, 20 Feb 2018 02:06:12 +0000 (19:06 -0700)]
demos: Clang format and update const correctness

Change-Id: Ic48d19b6e67c153db0cd86ff6390076d52d3f16f

6 years agodemos: Update/alter console and json output paths
Shannon McPherson [Thu, 25 Jan 2018 18:10:51 +0000 (11:10 -0700)]
demos: Update/alter console and json output paths

Json is now sent to stdout instead of a file. Html and json output are
now the only two output paths that can exist in the same instance.

Change-Id: I2d28d9b996c11535bf170e7e25b5acd8f57276e1

6 years agodemos: Add Windows functionality
Shannon McPherson [Mon, 8 Jan 2018 20:33:27 +0000 (13:33 -0700)]
demos: Add Windows functionality

Also, bug fixes.

Change-Id: I6828ea2958cc05342d9ab5a5438c032080bb849d

6 years agodemos: Change post-increment to pre-increment
Shannon McPherson [Wed, 21 Feb 2018 18:00:17 +0000 (11:00 -0700)]
demos: Change post-increment to pre-increment

Change-Id: I2bc7a4d207330892c29fa8053705db0548963c00

6 years agodemos: Add functionality on Linux for single GPU
Shannon McPherson [Thu, 4 Jan 2018 23:23:31 +0000 (16:23 -0700)]
demos: Add functionality on Linux for single GPU

Vulkaninfo JSON output appears as expected in Linux environment.
Implemented on a system with a single GPU.

Change-Id: I3179b3d479270c71a9f7955b41d19924baf10bfb

6 years agodemos: Implement JSON coverage for more Vk objs
Shannon McPherson [Fri, 15 Dec 2017 23:30:46 +0000 (16:30 -0700)]
demos: Implement JSON coverage for more Vk objs

Change-Id: I6584027b83e4d55e2ad99680f7f3645a45285917

6 years agodemos: surfaceCapabilities output; gpu select
Shannon McPherson [Mon, 4 Dec 2017 23:54:20 +0000 (16:54 -0700)]
demos: surfaceCapabilities output; gpu select

User can now specify which GPU they want to save information for

Change-Id: Iac60fc883b32677bc2a59f4b3143aa727e3732cb

6 years agoscripts: Strip xref markup from vu error messages
Mike Schuchardt [Wed, 21 Feb 2018 16:03:34 +0000 (09:03 -0700)]
scripts: Strip xref markup from vu error messages

Convert asciidoctor xref markup from "<<anchor, text>>" to "text" for VU
error messages.  Longer term plan is to modify the upstream validusage
build target in Vulkan-Docs to emit plain text to begin with.

Change-Id: I6ca6ffb4701df27c9c1666598fbeceb0f3a03216

6 years agoheader: Update to version 1.0.69 of the Vulkan hdr
Mark Lobodzinski [Tue, 20 Feb 2018 16:37:55 +0000 (09:37 -0700)]
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

6 years agolayers: Convert 2 barrier checks to VUID notation
John Zulauf [Tue, 20 Feb 2018 21:33:18 +0000 (14:33 -0700)]
layers: Convert 2 barrier checks to VUID notation

Converted two validation checks for image and buffer barriers to the
VALIDATION_ERROR_xxxxxxxx / VUID notation and changed unit tests to
also specify desired failure in same form.

VALIDATION_ERROR_0a00095c  VUID-VkImageMemoryBarrier-newLayout-01198
VALIDATION_ERROR_0180094a  VUID-VkBufferMemoryBarrier-size-01189

Change-Id: I20387bfec89872825f7311e443105aecacb84000

6 years agolayers: Fix and convert buffer barrier size check
John Zulauf [Tue, 20 Feb 2018 19:19:28 +0000 (12:19 -0700)]
layers: Fix and convert buffer barrier size check

Change buffer barrier size check to compare against the created size of
the buffer, not the memory requirements size, and add VUID info to
validation.  Update test to reflect validation changes.

Change-Id: Ib61d6bcd0df449bacd063ece44426ba6196b62e6

6 years agotests: Add unit test for "no memory bound" barrier
John Zulauf [Tue, 20 Feb 2018 18:46:40 +0000 (11:46 -0700)]
tests: Add unit test for "no memory bound" barrier

Add to unit tests for the validation of the requirement that memory must
be bound to non-sparse resource before they can be used in a barrier
command.

Change-Id: I73c3f0b8a62fd1a4f4bd177a69cde4ab421cf3e3
Note: There is no current VUID for this requirement.

6 years agolayers: A memory binding validation for barriers
John Zulauf [Mon, 19 Feb 2018 23:32:08 +0000 (16:32 -0700)]
layers: A memory binding validation for barriers

Add validation to ensure non-sparse resources are bound to memory before
being referenced in a barrier command.

Change-Id: I007200833d19a96e92ef61a91851c6395b8b9c57

6 years agodemos: clang-format only
Dave Houlton [Fri, 16 Feb 2018 18:02:26 +0000 (11:02 -0700)]
demos: clang-format only

Apply a whole-file clang-format to LVL demos folder.

Change-Id: I5f7fc8b67e7f3f3eeaa34a2ae757004fb7334743

6 years agodemos: ensure DISPLAY envar is valid
Mike Weiblen [Tue, 13 Feb 2018 20:56:13 +0000 (13:56 -0700)]
demos: ensure DISPLAY envar is valid

If the DISPLAY environment variable is unset or null, the cube demo will
emit "Cannot find a compatible Vulkan installable client driver (ICD)."
That message is not helpful when attempting to resolve the issue, since
the problem is with the envar, not the ICD.

Change-Id: Idf145cf0da906a4a8352b5bb136f88d9c1bca90d

6 years agolayers: Handle multiple GetSwapchainImages calls
Mark Lobodzinski [Fri, 16 Feb 2018 18:24:21 +0000 (11:24 -0700)]
layers: Handle multiple GetSwapchainImages calls

Unique Objects was fixed to prevent uniquifying duplicate image objects
for multiple GetSwapchainImageKHR calls.

Change-Id: I14bc3d8145a37b74adcdef68970b3dffc539d511

6 years agolayers: Move U_O:DestroySwapchain out of codegen
Mark Lobodzinski [Fri, 16 Feb 2018 16:58:07 +0000 (09:58 -0700)]
layers: Move U_O:DestroySwapchain out of codegen

This function in the unique_objects layer will need to clean up some
swapchain image index tracking information and so will now be
manually written.

Change-Id: I306fdd9f7a3c75c21b82fe21951804bd86259781

6 years agolayers: Fix linux compilation errors of isnan
John Zulauf [Mon, 19 Feb 2018 17:09:35 +0000 (10:09 -0700)]
layers: Fix linux compilation errors of isnan

Added std:: to isnan invocation.

Change-Id: I1353c4116497a88625a12e4003121716ec66a4f0

6 years agotests: Implement VkViewport tests
Petr Kraus [Tue, 9 Jan 2018 23:19:16 +0000 (00:19 +0100)]
tests: Implement VkViewport tests

6 years agotests: Add dynamic multiViewport test
Petr Kraus [Tue, 9 Jan 2018 21:09:51 +0000 (22:09 +0100)]
tests: Add dynamic multiViewport test

6 years agotests: Implement vkCmdSetViewport tests
Petr Kraus [Tue, 9 Jan 2018 21:09:42 +0000 (22:09 +0100)]
tests: Implement vkCmdSetViewport tests

6 years agotests: Fix tests using invalid viewport
Petr Kraus [Tue, 9 Jan 2018 21:09:35 +0000 (22:09 +0100)]
tests: Fix tests using invalid viewport

6 years agolayers: Reimplement vkCmdSetViewport param val.
Petr Kraus [Tue, 9 Jan 2018 21:09:25 +0000 (22:09 +0100)]
layers: Reimplement vkCmdSetViewport param val.

6 years agolayers: Implement `VkViewport` parameter_validation
Petr Kraus [Tue, 9 Jan 2018 21:09:09 +0000 (22:09 +0100)]
layers: Implement `VkViewport` parameter_validation

6 years agoandroid: Update shaderc known-good 20180216
Cody Northrop [Fri, 16 Feb 2018 14:45:27 +0000 (07:45 -0700)]
android: Update shaderc known-good 20180216

6 years agotests: Add test to verify issue 2213 fixed
Jeremy Kniager [Fri, 2 Feb 2018 22:06:10 +0000 (15:06 -0700)]
tests: Add test to verify issue 2213 fixed

Change-Id: I9776db7e08a0d69260a80f50f708db9517c68d69

6 years agolayers: clang-format only
Dave Houlton [Wed, 7 Feb 2018 17:51:23 +0000 (10:51 -0700)]
layers: clang-format only

Whole-file clang-format of layers .h and .cpp files

Change-Id: I683ad38fa9bced371a923b86d8cc916f2c2aa947

6 years agotests: clang-format only
Dave Houlton [Wed, 7 Feb 2018 00:49:16 +0000 (17:49 -0700)]
tests: clang-format only

No code changes, just full clang-format.

Change-Id: I096d1b5509897bd642545e3369ccd83ca2849441

6 years agoloader: Don't add duplicate JSON files from Khronos registry path.
Norbert Garnys [Tue, 13 Feb 2018 15:32:03 +0000 (16:32 +0100)]
loader: Don't add duplicate JSON files from Khronos registry path.

To make sure we avoid enumerating old JSON files/drivers that might be present
in the non-device specific area of the registry when a newer device specific
JSON file is present, do a check before adding.
Find the file name, without path, of the JSON file found in the non-device
specific registry location. If the same JSON file name is already found in
the list, don't add it again.

6 years agolayers:Verify sparse image metadata is bound
Tobin Ehlis [Thu, 8 Feb 2018 21:10:35 +0000 (14:10 -0700)]
layers:Verify sparse image metadata is bound

Any image for which sparse memory requirements are bound, flag if that
image requires metadata. When binding sparse memory, for any image that
requires metadata and no metadata was bound, issue a warning.

6 years agolayers:Add sparse mem warning if reqs not checked
Tobin Ehlis [Thu, 8 Feb 2018 20:30:56 +0000 (13:30 -0700)]
layers:Add sparse mem warning if reqs not checked

If vkQueueBindSparse() is called to bind sparse memory to an image,
trigger a warning if the user has not queried sparse requirements for
that image.

6 years agolayers:Track sparse image requirements
Tobin Ehlis [Thu, 8 Feb 2018 18:19:10 +0000 (11:19 -0700)]
layers:Track sparse image requirements

Add image state tracking for if sparse memory requirements have been
queried and when they are queried, save the requirements.

6 years agolayers:Adding intercepts for sparse binding
Tobin Ehlis [Thu, 8 Feb 2018 15:59:22 +0000 (08:59 -0700)]
layers:Adding intercepts for sparse binding

Intercept vkGetImageSparseMemoryRequirements() and
vkGetPhysicalDeviceSparseImageFormatProperties() functions and their
2KHR equivalents in core_validation in preparation for adding sparse
checks. Initially just pass-through intercepts.

6 years agolayers: fix unexpected errors in layer tests
Jeremy Kniager [Thu, 25 Jan 2018 18:41:20 +0000 (11:41 -0700)]
layers: fix unexpected errors in layer tests

Adjusted to not conflict with PR #2387

Change-Id: I7afc90577cb269070beda4f33bb04ab2a2c28f40

6 years agolayers:Fix spelling truely->truly
Tobin Ehlis [Tue, 13 Feb 2018 16:35:47 +0000 (09:35 -0700)]
layers:Fix spelling truely->truly

6 years agoloader: Fix loader skipping layer files
Lenny Komow [Tue, 13 Feb 2018 17:30:02 +0000 (10:30 -0700)]
loader: Fix loader skipping layer files

Fix a bug where having a json file in the layer path that isn't a
valid layer would cause the other valid layers to be skipped

Change-Id: I8346bd223358f271a48799d249d3b3a941dd31f8

6 years agolayers:Fix typo databate->database
Tobin Ehlis [Tue, 13 Feb 2018 14:41:17 +0000 (07:41 -0700)]
layers:Fix typo databate->database

6 years agolayers:Remove TODO comments
Tobin Ehlis [Tue, 13 Feb 2018 14:36:54 +0000 (07:36 -0700)]
layers:Remove TODO comments

After discussion in Khronos, explicit VUIDs for these descriptor set
lifetime cases are not going to be added to the spec. There are no
similar VUs for related object lifetime cases so will continue using
the existing VUIDs for valid descriptor set handles which is a
reasonable compromise.

6 years agoloader: link with OneCore umbrella library
Slawomir Cygan [Thu, 25 Jan 2018 12:51:17 +0000 (13:51 +0100)]
loader: link with OneCore umbrella library

This change makes loader use OneCore umbrella[2] library, common
to all Windows 10 devices and required with for Universal
Windows drivers[1].

As this change may not be compatible with previous versions of
Windows, it's enabled via CMAKE option:
   -DENABLE_WIN10_ONECORE=1

[2] https://msdn.microsoft.com/en-us/library/windows/desktop/mt654039(v=vs.85).aspx
[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/getting-started-with-universal-drivers

Change-Id: Ib677face131ab2edb3e8cd2f764fe4e0ca44cecc

6 years agoloader: use Unicode functions from cfgmgr32.lib
Slawomir Cygan [Thu, 25 Jan 2018 12:48:54 +0000 (13:48 +0100)]
loader: use Unicode functions from cfgmgr32.lib

This change improves loader compatibility with Universal
Windows drivers[1]: do not use removed ANSI-based functions,
use Unicode equivalentsexposed in umbrella[2] library.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/getting-started-with-universal-drivers
[2] https://msdn.microsoft.com/en-us/library/windows/desktop/mt654039(v=vs.85).aspx

Change-Id: I8ead9c46815d15e1b2f2226eb30110c8efa4ec75

6 years agoloader: remove references to shlwapi.lib
Slawomir Cygan [Wed, 24 Jan 2018 14:34:15 +0000 (15:34 +0100)]
loader: remove references to shlwapi.lib

This change improves loader compatibility with Universal
Windows drivers[1]: shlwapi.lib is not a part of allowed APIs.

It seems PathFileExists call was already redundant as
ERROR_MOD_NOT_FOUND was already returned by the loader in
cse of wrong dll path.

PathIsRelative is replaced by equivalent check.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/getting-started-with-universal-drivers

Change-Id: I36854f38078670ac033e8bd415dbf368391e8448

6 years agowinsdk: Update runtime installer copyright to 2018
Lenny Komow [Thu, 8 Feb 2018 17:55:26 +0000 (10:55 -0700)]
winsdk: Update runtime installer copyright to 2018

Change-Id: If27613c85c754d4a54f5afa4dd3a6976695b227e

6 years agobuild: Add min supported compiler versions to BUILD.md
Mark Lobodzinski [Wed, 7 Feb 2018 23:33:33 +0000 (16:33 -0700)]
build: Add min supported compiler versions to BUILD.md

Change-Id: I694aaf18e3f4f1d458fa2a4f84f84c4553e93a0a

6 years agolayers: Avoid warnings in vk_layer_logging.h
Mark Lobodzinski [Wed, 7 Feb 2018 17:00:22 +0000 (10:00 -0700)]
layers: Avoid warnings in vk_layer_logging.h

This file was often included in files where only a subset of the
functions were called, resulting in -Wunused_function warnings from
GCC. Made these functions inline to avoid the warnings.

Change-Id: Iaa3765ee51a290f0dd82d1a6a91116b6e1eec2c1

6 years agodemos: Let vulkaninfo accept empty DISPLAY variable
Petr Kraus [Tue, 6 Feb 2018 03:33:38 +0000 (04:33 +0100)]
demos: Let vulkaninfo accept empty DISPLAY variable

6 years agoandroid: Update to shaderc known-good revisions
Cody Northrop [Tue, 6 Feb 2018 22:12:36 +0000 (15:12 -0700)]
android: Update to shaderc known-good revisions

6 years agoexternal: Update glslang commit ID, fix LVT
Mark Lobodzinski [Tue, 6 Feb 2018 17:05:06 +0000 (10:05 -0700)]
external: Update glslang commit ID, fix LVT

Updated glslang revision to TOT, fixed layer validation test for
new spirv-validator message output.

Change-Id: I8c31d6cfc09cf73f4235b2159e3fe4e6ec289330

6 years agobuild: Adjust travis config for VT updates
Karl Schultz [Tue, 6 Feb 2018 13:12:35 +0000 (06:12 -0700)]
build: Adjust travis config for VT updates

- VT update external script no longer accepts jsoncpp flag
  so remove call to build it.  The script now builds it all the time.
- Add back cmake flag to turn off LVL layers build.  LVL should
  now build the layer utils even with layer build disabled.  VT
  needs the layer utils to build devsim.

Change-Id: I1c5421d4b5553b3d39f68f075ee5850588696775

6 years agoclang-format whitespace (sigh)
Dave Houlton [Fri, 2 Feb 2018 23:32:41 +0000 (16:32 -0700)]
clang-format whitespace (sigh)

Change-Id: I52d956163900465e434f68aa185618a2469f243f

6 years agotests: Fix Travis-visible errors
Dave Houlton [Fri, 2 Feb 2018 20:24:59 +0000 (13:24 -0700)]
tests: Fix Travis-visible errors

Fix a couple test errors that aren't visible to the local CI,
but are caught by Travis.

Change-Id: I618e102ccc7dd27b4d3ebeaa596d3fbe059a99f0

6 years agotests: Add test for new CreateImage VUs
Dave Houlton [Wed, 31 Jan 2018 20:01:42 +0000 (13:01 -0700)]
tests: Add test for new CreateImage VUs

Add ImageCreateInfoStructErrors positive test, provokes new
ImageCreateInfo struct VU errors.

Change-Id: Ia7b2b955ded6b4851d936758047eeb7462e630cc

6 years agotests: Fix existing tests that hit new VUs
Dave Houlton [Tue, 30 Jan 2018 22:03:43 +0000 (15:03 -0700)]
tests: Fix existing tests that hit new VUs

Fix existing tests that were inadvertently triggering the
newly added valid usage checks.

Change-Id: I0a6baa4df36c2316070e73f8959d55b4ca6a30f8

6 years agolayers: Add CreateImage valid usage checks
Dave Houlton [Mon, 29 Jan 2018 20:39:56 +0000 (13:39 -0700)]
layers: Add CreateImage valid usage checks

Adds 17 valid usage checks of ImageCreateInfo struct. 13 in core
validation, 4 in parameter validation.

Change-Id: I4bfe195f88d5e14237c1b01c5aca2de7c578aa67

6 years agobuild: Move layer_utils build to top-level cmake
Mark Lobodzinski [Fri, 2 Feb 2018 20:58:41 +0000 (13:58 -0700)]
build: Move layer_utils build to top-level cmake

DevSim requires this library, but it is only built in LVL if LAYERS
are built. Moved the generation of this library out of the layers
cmake file and into the root cmake file.

Change-Id: I1c633e981fa1843cfb49204d2ac130beb8d99dfc

6 years agoicd: Remove dead code from CMakeLists.txt
Mark Lobodzinski [Fri, 2 Feb 2018 18:40:50 +0000 (11:40 -0700)]
icd: Remove dead code from CMakeLists.txt

Change-Id: I6b60b2e71568a3a88a3366b04ab7cf911fa05526

6 years agoscripts: Update android-generate to support UUID
Cody Northrop [Mon, 5 Feb 2018 19:03:10 +0000 (12:03 -0700)]
scripts: Update android-generate to support UUID

This allows use of the script as is, automatically
selecting git_dir vs. rev_file based on detected paths.

6 years agoscripts: Fix error if spirv-tools dir had no .git (#2346)
Cort Stratton [Fri, 2 Feb 2018 07:25:21 +0000 (23:25 -0800)]
scripts: Fix error if spirv-tools dir had no .git (#2346)

external_revision_generator.py generates a UUID for
VkValidationCacheEXT objects created by the layers, based on
the commit ID of the HEAD revision in the spirv-tools repo
used to build those layers. This implicitly required that
the spirv-tools source is hosted in a Git repository, which
is not the case in all validation layers build environments.

The script has been modified to accept *either* a path to
a Git working directory to query *or* a path to a file whose
contents are SHA1-hashed (if necessary) and treated as the
"commit ID" for the project.

Call sites for the script in the CMake and Android build paths
have been updated to use the --git_dir approach by default,
which matches the pre-existing behavior.

6 years agolayers: Improve validation cache ID parsing
Cort Stratton [Fri, 2 Feb 2018 07:14:50 +0000 (23:14 -0800)]
layers: Improve validation cache ID parsing

- Code previously assumed that SPIRV_TOOLS_COMMIT_ID was a SHA1 hash;
  this assumption is now more explicit.
- Replace some literal constants with VK_UUID_SIZE.
- Handle the purely hypothetical case where VK_UUID_SIZE*2 > SHA1 size

6 years agolayers: Add err-id/coverage for 'recording state'
John Zulauf [Tue, 30 Jan 2018 22:04:56 +0000 (15:04 -0700)]
layers: Add err-id/coverage for 'recording state'

Added map from CMD_TYPE to validation error for "must be in the
recording state" valid usage ID.  Add complete check coverage
(except vendor/KHX extensions) for this class of VUID.  Coverted
existing checks to use common code.

Change-Id: I38f71cce2a0f090f2685074239a1b429bbf95d8c

6 years agolayers: Fully normalize/populate CMD_TYPE enum
John Zulauf [Tue, 30 Jan 2018 16:24:38 +0000 (09:24 -0700)]
layers: Fully normalize/populate CMD_TYPE enum

Add all vkCmd.* (plus vkEndCommandBuffer) to the CMD_TYPE, normalizing
the naming to be consistent with the function names.

Change-Id: I50503a4e180d726b330c42db050a1336221213f6

6 years agocmake: Move LVL temp/worker targets into subfolder
Mark Lobodzinski [Thu, 1 Feb 2018 16:27:03 +0000 (09:27 -0700)]
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

6 years agotests: Fix various issues in VkLayerTest.IncompatibleRenderPass
Chris Forbes [Wed, 31 Jan 2018 19:44:53 +0000 (11:44 -0800)]
tests: Fix various issues in VkLayerTest.IncompatibleRenderPass

- Swap the roles of the two renderpasses to avoid CmdBeginRenderPass
complaining about mismatches between framebuffer and rp
- Get rid of spurious input attachment which caused extra error
messages. If the input attachment case is interesting, we should test
for it separately. The rest of this test only cares about a format
difference between the renderpasses.

6 years agobuild: Need to build LVL layers in CI to get utils
Karl Schultz [Thu, 1 Feb 2018 21:31:01 +0000 (14:31 -0700)]
build: Need to build LVL layers in CI to get utils

Layer utils now exist only in LVL, so when we build VulkanTools
in LVL CI (just to get devsim layer), we need to turn on LVL
layer building in order to get the layer util libs.

Change-Id: I4cc6df4ed0a782afeec19c61dc05bcc2bad47756

6 years agolayers: Add LAYER_EXPORT specifiers to vk_layer_config
Mark Lobodzinski [Thu, 1 Feb 2018 19:14:30 +0000 (12:14 -0700)]
layers: Add LAYER_EXPORT specifiers to vk_layer_config

Required for hassle-free linking to layer_utils lib.

6 years agodemos: Fix output location of smoketest
Mark Lobodzinski [Tue, 30 Jan 2018 23:09:08 +0000 (16:09 -0700)]
demos: Fix output location of smoketest

6 years agotests: Positive test case for KHR bind mem 2
Mike Schuchardt [Thu, 18 Jan 2018 23:54:57 +0000 (16:54 -0700)]
tests: Positive test case for KHR bind mem 2

Add positive test case with simple usage of VK_KHR_bind_memory2 that was
causing incorrect validation errors.

Change-Id: I9502b5f933e288c6d20f909d9d007b3b1e3abdef

6 years agolayers: Pass through bind mem 2 entry point names
Mike Schuchardt [Thu, 25 Jan 2018 20:44:17 +0000 (13:44 -0700)]
layers: Pass through bind mem 2 entry point names

Change-Id: I62510d1759c7cd3ca81b3c7e57a153b7c863250b

6 years agolayers: Bind mem 2 entry points
Mike Schuchardt [Fri, 19 Jan 2018 00:59:06 +0000 (17:59 -0700)]
layers: Bind mem 2 entry points

Add entry points for VK_KHR_bind_memory2 and wire up to existing
validation

Change-Id: Iab17ead7a6f6f44fdbdf2ad5033d2ea7e47447d0