platform/upstream/Vulkan-LoaderAndValidationLayers.git
7 years agotests: Fix VkLayerTest on Intel Mesa 17.0.3
Mark Young [Fri, 7 Apr 2017 14:59:56 +0000 (08:59 -0600)]
tests: Fix VkLayerTest on Intel Mesa 17.0.3

VkLayerTest portion of layer_validation_tests was seg faulting
because we attempted to create depth surfaces without suggesting
they be optimal tiling.

Change-Id: I2122084be0ca0aceb4e85b77278b19c111823d88

7 years agoloader: Fix loader and layer negotiation
Mark Young [Wed, 29 Mar 2017 19:39:27 +0000 (13:39 -0600)]
loader: Fix loader and layer negotiation

Resolve missing struct sType as well as extern of
vkNegotiateLoaderAndLayerInterface as a C function.  Finally,
bump up the JSON file version so it looks for the negotiate
function.

Change-Id: I7fd4784fce6cbd0c303f7b2bb354542e4b16b1df

7 years agobuild: Add notifications to travis config
Cody Northrop [Thu, 6 Apr 2017 19:18:13 +0000 (13:18 -0600)]
build: Add notifications to travis config

7 years agotests:Update some unexpected error msgs
Tobin Ehlis [Wed, 5 Apr 2017 18:06:10 +0000 (12:06 -0600)]
tests:Update some unexpected error msgs

Some error messages slightly changed with latest unique ID update so
need to modify the txt for unexpected errors.

Also add skips to some tests for unsupported image formats. These
tests were getting unexpected errors on an Intel system.

7 years agotests: Use logcat for output on Android
Cody Northrop [Wed, 5 Apr 2017 19:05:51 +0000 (13:05 -0600)]
tests: Use logcat for output on Android

Use the following to see output when using the APK:
adb logcat | grep VulkanLayerValidationTests

Printfs still won't show up, but this should give a
better idea of how things are running on production
devices, including when a test hangs or crashes.

7 years agolayers: Fix GH 1639.
Jeremy Hayes [Tue, 4 Apr 2017 21:05:52 +0000 (15:05 -0600)]
layers: Fix GH 1639.

Check base+count instead of just base. Fix FramebufferCreateErrors test
to use the correct number of mip levels. Also, add a test for count,
fix a few function names, and apply some soothing const cream.

Change-Id: Ib2deb8bc27e76138f83b3dd32529583a30085cda

7 years agobuild: Add object_types codegen steps for Android
Mark Lobodzinski [Wed, 5 Apr 2017 14:18:18 +0000 (08:18 -0600)]
build: Add object_types codegen steps for Android

Change-Id: If54d83c9b5c67ad92f7510718e1194391bf9fff5

7 years agocmake: Add build steps for object types header
Mark Lobodzinski [Tue, 4 Apr 2017 13:38:17 +0000 (07:38 -0600)]
cmake: Add build steps for object types header

Change-Id: I395922f4876d1d3b950a4edd0aac9fc73733b9d5

7 years agoscripts: Add external/internal object type xlation
Mark Lobodzinski [Tue, 4 Apr 2017 18:07:38 +0000 (12:07 -0600)]
scripts: Add external/internal object type xlation

Change-Id: Ib621d93069912bac6bbdc643c02fe6b711803c6f

7 years agoscripts: Add object_type header file gen interface
Mark Lobodzinski [Mon, 3 Apr 2017 22:59:15 +0000 (16:59 -0600)]
scripts: Add object_type header file gen interface

Change-Id: I2e4a9be203f13daccc5674d0b8f66729046af46c

7 years agoscripts: Add object type enum generation to helper
Mark Lobodzinski [Mon, 3 Apr 2017 22:58:04 +0000 (16:58 -0600)]
scripts: Add object type enum generation to helper

Extended the helper_file_generator to produce an object type enum
header file.

Change-Id: I8013091b34028522d8f50ef3941d7021b262613c

7 years agoscripts:Fixup a few val error db mistakes
Tobin Ehlis [Wed, 5 Apr 2017 13:55:29 +0000 (07:55 -0600)]
scripts:Fixup a few val error db mistakes

Correctly mark which checks are implemented so that vkvalidatelayerdoc
documenation validation will pass.

7 years agoscripts:Update unique IDs for spec v1.0.45.1
Tobin Ehlis [Tue, 4 Apr 2017 18:23:48 +0000 (12:23 -0600)]
scripts:Update unique IDs for spec v1.0.45.1

Another massive update. Totally overhauled the mapping algorithm.
The basic outline of the new algorithm is:
-Try to map complete error message to prev ID
-Then try to map error msg w/o link to prev ID
-Finally try to map just core error string (no section) to prev ID
-Else assign it a new unique ID

See code for complete details.

In anticipation of integrated uniqueIDs I took a little liberty with
this update in that I didn't attempt to remap EVERY new ID to previous
IDs. I did many of them and made sure to account for every previous ID
that was implemented.
IDs will all be undergoing a one-time change with their integration
into the spec anyway so there is little harm in letting non-implemented
IDs drift a bit for now and it helps save my sanity.
I did add a validation step to the spec.py script to make sure and flag
any IDs that previously were implemented and suddenly are no longer in
the re-mapped version of IDs.

I manually presevered IDs 911 & 912 which get masked from the extension
spec.
I also had to do some manual updates on an offline spec to keep the
parser from breaking on the non-xhtml compliant spec.

Command line was:
python spec.py -update -remap 92-72:97-77:112-92:116-96:123-103:124-105:
133-114:148-2349:154-133,2:156-135:157-139:204-156:205-155:206-154:
417-269:1189-769:1417-938:1446-965:1448-967:1449-968:1487-974:
2193-1430,5:683-496:684-494:728-529:729-527:1628-1086:1731-1180:
1736-1183:1796-1234:1815-1251

7 years agowinsdk: Fix missing vulkaninfo file extension
Lenny Komow [Tue, 4 Apr 2017 21:35:28 +0000 (15:35 -0600)]
winsdk: Fix missing vulkaninfo file extension

Change-Id: I9cef2172ed568372bca512d597099c37e4f0766e

7 years agolayers: Fix incorrect feature protect for KHX ext
Mark Lobodzinski [Mon, 3 Apr 2017 16:39:08 +0000 (10:39 -0600)]
layers: Fix incorrect feature protect for KHX ext

Change-Id: I503c2984163455fd5fd91df6fa70da1dc88fc684

7 years agodemos: Remove DbgMsgs from incremental_present ext
Ian Elliott [Tue, 28 Mar 2017 17:10:18 +0000 (11:10 -0600)]
demos: Remove DbgMsgs from incremental_present ext

The only DbgMsg messages left tell the user, if they use
"--incremental_present", whether the functionality is actually being
used, or if the VK_KHR_incremental_present extension isn't available.

NOTE: When somebody wants to see all of the DbgMsg messages, they should
use "git revert" with this commit.

Change-Id: Ic4189cbec2a64c50135b16c331c808fbbce975dc

7 years agodemos: Use VK_KHR_incremental_present extension
Ian Elliott [Tue, 28 Mar 2017 17:06:33 +0000 (11:06 -0600)]
demos: Use VK_KHR_incremental_present extension

Show how to use the VK_KHR_incremental_present extension.  Other notes:

- There are a few diagnostic DbgMsg()'s, which can help show the usage.
- Added a "--incremental_present" command-line option to turn on use of
  VK_KHR_incremental_present
- Should compile and run on Windows, Linux, and Android, but the feature will
  only really be used on systems that support the extension.

Change-Id: I8a79d806cab7d35197c94dd85358a62b6b7469be

7 years agolayers: incremental_present parameter validation
Tobin Ehlis [Fri, 13 Jan 2017 19:13:57 +0000 (12:13 -0700)]
layers: incremental_present parameter validation

Add parameter validation for VK_KHR_incremental_present extension.
If the VkPresentRegionsKHR is included down the struct chain for
QueuePresentKHR() validate its parameters.

Change-Id: I97abe552411f229eecbbf7df7d565f7953cdd1b7

7 years agolayers: incremental_present rectangle validation
Tobin Ehlis [Fri, 13 Jan 2017 19:21:07 +0000 (12:21 -0700)]
layers: incremental_present rectangle validation

In core_validation verify the offset, extent & layer values for each
VkRectLayerKHR struct passed into vkQueuePresentKHR() for the
VK_KHR_incremental_present extension.

Change-Id: I4aa7cbac61afa6f4c9e733bb51cd486aadab5cec

7 years agoheader: Update to 1.0.46 Vulkan version
Mark Lobodzinski [Mon, 3 Apr 2017 14:22:04 +0000 (08:22 -0600)]
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

7 years agoscripts: Add ceiling function to vk_struct_size_helper
mizhen [Fri, 31 Mar 2017 15:08:16 +0000 (09:08 -0600)]
scripts: Add ceiling function to vk_struct_size_helper

Change-Id: Ia377c52e43442fec17b823c888df6685eff0aca5

7 years agoloader: Fix loader crash with multiple instances
Lenny Komow [Fri, 31 Mar 2017 19:43:35 +0000 (13:43 -0600)]
loader: Fix loader crash with multiple instances

Change-Id: Ia72feb84bcc8bfa479694e901beb4fa685fdfdf3

7 years agolayers: Fix WriteDescriptorSet::dstSet validation
Dustin Graves [Thu, 30 Mar 2017 21:42:16 +0000 (15:42 -0600)]
layers: Fix WriteDescriptorSet::dstSet validation

VkWriteDescriptorSet::dstSet is ignored by vkCmdPushDescriptorSetsKHR,
so the 'must not be a null handle' validation for dstSet has been moved
from the code validating the VkWriteDescriptor struct members to the
code validating the vkUpdateDescriptorSets function parameters.

Change-Id: Ia6f11d33e4d57d4c848aab72cfd91da5d5a15a30

7 years agotests: Re-fixed multi-init tests, smaller hammer
Dave Houlton [Thu, 30 Mar 2017 16:32:10 +0000 (10:32 -0600)]
tests: Re-fixed multi-init tests, smaller hammer

Change-Id: I61164e4a5714647f70cffab04730034d22b1d4db

7 years agotests: clang-format
Dave Houlton [Thu, 30 Mar 2017 15:48:28 +0000 (09:48 -0600)]
tests: clang-format

Change-Id: I8e6c6dcc57e6b27249608e497974fafac753eabe

7 years agotests: Add assert for multiple initializations
Dave Houlton [Wed, 29 Mar 2017 18:05:26 +0000 (12:05 -0600)]
tests: Add assert for multiple initializations

Added an assert in render framework to flag an Init() call when
the VkInstance is already initialized. Re-initialization without
an explicit cleanup leads to leaked Vk resources and potential
ICD confusion. Fixed several occurances of multiple inits calls
in the layer tests.

Change-Id: Ib14df524e05f9c839d734b9914006caa22b5db41

7 years agoandroid: Update to matching desktop glslang version
Cody Northrop [Wed, 29 Mar 2017 23:14:35 +0000 (17:14 -0600)]
android: Update to matching desktop glslang version

7 years agoexternal: Update external reference commit ID
Mike Weiblen [Wed, 29 Mar 2017 21:41:20 +0000 (15:41 -0600)]
external: Update external reference commit ID

Update glslang to latest.

Change-Id: I2d235b4282a61764949105b1b76ff9d1cddc204a

7 years agolayers: Rename format utils, strip Vk
Dave Houlton [Wed, 29 Mar 2017 17:43:58 +0000 (11:43 -0600)]
layers: Rename format utils, strip Vk

Change-Id: I4d192db22c51d2e9224b74487bfd5d6a58405028

7 years agolayers: refactor layer utils
Dave Houlton [Mon, 27 Mar 2017 23:25:54 +0000 (17:25 -0600)]
layers: refactor layer utils

Split format-related helper fxns out of vk_layer_utils.cpp into a new
file vk_format_utils.cpp.  Remove the duplicated fxns in the render
framework and share the new format utils across both projects.
Rename the util fxns into CamelCase per coding std.

Change-Id: I0f9a34bc5931dfca085dfdc8d4800664aec526cf

7 years agolayers: Add ios, mac and nintendo surface tracking
Mark Lobodzinski [Wed, 29 Mar 2017 16:51:30 +0000 (10:51 -0600)]
layers: Add ios, mac and nintendo surface tracking

Three extensions have been added that get VkSurface objects for
various operating environments. Added functions to object_tracker
to catch the creation of these Vulkan objects to prevent spurious
validation errors. Extensions are VK_NN_vi_surface, VK_MVK_ios_surface
and VK_MVK_macos_surface.

Change-Id: I0357a3a012c5020a5ab44877fd9fef627e769121

7 years agolayers: Remove unneccessary line in unique_objects
Mark Lobodzinski [Wed, 29 Mar 2017 17:55:44 +0000 (11:55 -0600)]
layers: Remove unneccessary line in unique_objects

Change-Id: If658b4196e895a1229495c6acb40fb50feadd02c

7 years agolayers: Fix push_desc_with_template in unique_objs
Mark Lobodzinski [Tue, 28 Mar 2017 22:22:56 +0000 (16:22 -0600)]
layers: Fix push_desc_with_template in unique_objs

Added unwrapping of vulkan objects embedded in this APIs data buffer.

Change-Id: Ibbee614148d10efe9a954cd793f0e92881300c71

7 years agolayers: Fix extension func/core struct codegen
Dustin Graves [Tue, 28 Mar 2017 20:18:54 +0000 (14:18 -0600)]
layers: Fix extension func/core struct codegen

Fix code generation for extension functions receiving struct parameter
types defined by core Vulkan.  Extensions are processed as separate
features by the code generator, and the type info required for structure
generation was not being shared across features.  The code generator has
been modified to share type info across features so that the validation
code generated for extension functions includes validation for core
structures:
 - Prevent unique objects and parameter validation code generators from
   clearing struct type info data structures at the start of feature
   processing.
 - Remove unused data structures from unique objects code generator.
 - Adds handle unwrapping and parameter validation for elements in the
   vkCmdPushDescriptorSetKHR pDescriptorWrites parameter.
 - Adds handle unwrapping and parameter validation for elements in the
   vkCreateSharedSwapCHainsKHR pCreateInfos parameter.
 - Adds VkAllocationCallback parameter validation to the WSI and
   descriptor update template extensions functions.

Change-Id: I016aa6550681dbf7d6bda834272374ce63ed1940

7 years agolayers: Add shader_subgroup_vote ext shader caps
Mark Lobodzinski [Tue, 28 Mar 2017 20:09:16 +0000 (14:09 -0600)]
layers: Add shader_subgroup_vote ext shader caps

Recognize and validate shader capabilities added in the new
VK_KHR_shader_subgroup_vote extension.

Change-Id: Ifbbcb1aa3b056707750c53d9a18965bfcae9028f

7 years agolayers: Add shader_subgroup_ballot ext shader caps
Mark Lobodzinski [Tue, 28 Mar 2017 19:34:55 +0000 (13:34 -0600)]
layers: Add shader_subgroup_ballot ext shader caps

Recognize and validate shader capabilities added in the new
VK_KHR_shader_subgroup_ballot extension.

Change-Id: I79f02f50600dcbd85f7b91aeefe56bb426f53b6b

7 years agolayers: Support viewport_array2 ext shader caps
Mark Lobodzinski [Thu, 23 Mar 2017 20:47:03 +0000 (14:47 -0600)]
layers: Support viewport_array2 ext shader caps

Recognize and validate shader capabilities added in the new
VK_NV_viewport_array2 extension.

Change-Id: Ifeb21d9230ca071a56246acc928add0a572b55f9

7 years agolayers: Support CapabilitySampleMaskOverrideCoverage
Mark Lobodzinski [Thu, 23 Mar 2017 20:30:25 +0000 (14:30 -0600)]
layers: Support CapabilitySampleMaskOverrideCoverage

Recognize and validate shader capability added in the new
VK_NV_sample_mask_override_coverage extension.

Change-Id: I30131189beee8cb5f087846eff3a5f7571d0d309

7 years agolayers: Support CapabilityGeometryShaderPassThroughNV
Mark Lobodzinski [Thu, 23 Mar 2017 20:04:56 +0000 (14:04 -0600)]
layers: Support CapabilityGeometryShaderPassThroughNV

Recognize and validate shader capability added in the new
VK_NV_geometry_shader_passthrough extension.

Change-Id: Iea46b9a8d0c77b695507ac5f1c8f8852f528c210

7 years agoandroid: Update toolchain revisions and locations
Cody Northrop [Mon, 27 Mar 2017 22:30:14 +0000 (16:30 -0600)]
android: Update toolchain revisions and locations

Start pulling from github again for more recent bits.

This includes changes to easily allow changing the repo url.

7 years agoheader: Update to 1.0.45 Vulkan version
Mark Lobodzinski [Mon, 27 Mar 2017 20:40:17 +0000 (14:40 -0600)]
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

7 years agoloader: Fix loader_extensions codegen for name defs
Mark Lobodzinski [Mon, 27 Mar 2017 21:47:01 +0000 (15:47 -0600)]
loader: Fix loader_extensions codegen for name defs

Codegen attempted to infer name definitions instead of pulling from
the source XML, causing errors in new header updates.

Change-Id: I04e03b45dacf7c943b91e47f6ecffc82354c6f1b

7 years agotests: Add test for duplicate pNext structures
Mark Lobodzinski [Mon, 27 Mar 2017 19:09:07 +0000 (13:09 -0600)]
tests: Add test for duplicate pNext structures

Change-Id: I45c59f8f00c199e773cd95c44a7962547ab7d879

7 years agolayers: Add pNext cycle/redundancy checks to PV
Mark Lobodzinski [Mon, 27 Mar 2017 17:52:02 +0000 (11:52 -0600)]
layers: Add pNext cycle/redundancy checks to PV

Change-Id: I06d311821ef0c10683ad8bdaf076231143cde22f

7 years agoexternals: Update GitHub master commit refs
Mike Weiblen [Mon, 27 Mar 2017 20:54:27 +0000 (14:54 -0600)]
externals: Update GitHub master commit refs

Update commit IDs pointing to external repos:
- glslang_revision
- spirv-tools_revision

Change-Id: I369caf0943c360234854d5ba25e42776417b0e6a

7 years agocube: Remove most DbgMsg usage the VK_GOOGLE_display_timing extension
Ian Elliott [Mon, 27 Mar 2017 20:38:52 +0000 (14:38 -0600)]
cube: Remove most DbgMsg usage the VK_GOOGLE_display_timing extension

The only DbgMsg messages left tell the user, if they use
"--display_timing", whether the functionality is actually being used, or
if the VK_GOOGLE_display_timing extension isn't available.

NOTE: When somebody wants to see all of the DbgMsg messages, they should
use "git revert" with this commit.

7 years agocube: GH1609: Use VK_GOOGLE_display_timing extension
Ian Elliott [Wed, 22 Mar 2017 14:31:27 +0000 (08:31 -0600)]
cube: GH1609: Use VK_GOOGLE_display_timing extension

Show how to use the VK_GOOGLE_display_timing extension (currently, only
available on the Android O release).  Other notes:

- There are many diagnostic DbgMsg()'s, which can help show the usage.
- This includes a port of the Vulkan CTS (dEQP) time code for use in
  cube.
- Added a "--display_timing" command-line option to turn on use of
  VK_GOOGLE_display_timing
- Compiles and runs on Windows, Linux, and Android, but the feature will
  only really be used on systems that support the extension.

7 years agolayers: VK_KHR_maintenance1 false positives
Mike Schuchardt [Tue, 21 Mar 2017 22:33:26 +0000 (16:33 -0600)]
layers: VK_KHR_maintenance1 false positives

Skip checks that no longer apply when VK_KHR_maintenance1 is enabled.

Change-Id: I84d0fe889d0e567045aeb7fa7463dd2ec0d56789

7 years agolayers: Expose core validation extension info
Mike Schuchardt [Tue, 21 Mar 2017 22:30:37 +0000 (16:30 -0600)]
layers: Expose core validation extension info

Change-Id: I94d854ad59d42ea4a0de0b76c7fb3829baf52abb

7 years agolayers: Remove obsolete error check from CV
Mark Lobodzinski [Fri, 24 Mar 2017 21:09:23 +0000 (15:09 -0600)]
layers: Remove obsolete error check from CV

Bad shader capability check is now in the spirv validator.

Change-Id: I3d96f935d0adb7081d6693cfc004ba215391054e

7 years agotests: Update bad spirv capability test
Mark Lobodzinski [Fri, 24 Mar 2017 20:49:45 +0000 (14:49 -0600)]
tests: Update bad spirv capability test

Error now comes from the spirv-validator much earlier in the test.

Change-Id: I131c877e7f8402edca9595bafd6ce143a1d21b27

7 years agoexternals: Update GitHub master commit refs
Mike Weiblen [Thu, 23 Mar 2017 20:12:18 +0000 (14:12 -0600)]
externals: Update GitHub master commit refs

Update commit IDs to external repos:
- glslang_revision
- spirv-headers_revision
- spirv-tools_revision

Change-Id: I79aa68a65d7440e4223b38401eef9bbb8d5a959f

7 years agotests: Disable CheckShaderBadCapability test
Mark Lobodzinski [Fri, 24 Mar 2017 20:16:42 +0000 (14:16 -0600)]
tests: Disable CheckShaderBadCapability test

Upcoming spirv-tools changes will cause failures.

Change-Id: Ibeb9bacf5ceade8caf1d9ece17b094258c1f1775

7 years agotests: Skip tests that will not generate expected error
Tony Barbour [Fri, 24 Mar 2017 22:36:01 +0000 (16:36 -0600)]
tests: Skip tests that will not generate expected error

Change-Id: I5a5ebe72a2080e3d30ce103f6c1caa1addd6557a

7 years agotests: Lookup depth format instead of assuming
Tony Barbour [Fri, 24 Mar 2017 21:42:21 +0000 (15:42 -0600)]
tests: Lookup depth format instead of assuming

Change-Id: Ie91eac3da51f4c26af04d69dfc124d195de84ebe

7 years agolayers: Consider depth+stencil formats to be both float and uint
Chris Forbes [Fri, 10 Mar 2017 02:01:52 +0000 (15:01 +1300)]
layers: Consider depth+stencil formats to be both float and uint

Depending on which aspect we will consume, these can be either type.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Convert fundamental type enum to bit field
Chris Forbes [Fri, 10 Mar 2017 01:58:08 +0000 (14:58 +1300)]
layers: Convert fundamental type enum to bit field

Some VkFormats can be consumed as multiple types -- specifically,
depth/stencil is either float or uint, depending on which aspect we
consume.

Convert to bitfield, and require intersection rather than equality.
While we're at it, drop out some weird special-casing for unknown
component types-- this is left over from when shader validation was much
less complete.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Dont run BindSparse if feature not present
Tony Barbour [Fri, 24 Mar 2017 21:00:21 +0000 (15:00 -0600)]
tests: Dont run BindSparse if feature not present

Change-Id: I9f4723c0a61ef269919b44cc9ca557085ce760d7

7 years agolayers: Removing redundant if in unique_objects
Arda Coskunses [Fri, 24 Mar 2017 17:00:52 +0000 (11:00 -0600)]
layers: Removing redundant if in unique_objects

Exact same if check performed multiple times.
Removing redundant one

Change-Id: Iff32a724e58a06b4a967ba2632e60cc5b4050238

7 years agotests: Fix UnexpectedError crashing on WinIntel
Dave Houlton [Thu, 23 Mar 2017 20:33:22 +0000 (14:33 -0600)]
tests: Fix UnexpectedError crashing on WinIntel

Fixed an error in RenderPassInUseDestroyedSignaled that was causing
a benign failure on most devices but throwing an exception on Intel
Windows driver.

Change-Id: I985429e1bf20f68710faf2012a201a18b4648939

7 years agolayers: Refactor ResolveRemainingLevelsLayers
Mark Lobodzinski [Thu, 23 Mar 2017 15:43:35 +0000 (09:43 -0600)]
layers: Refactor ResolveRemainingLevelsLayers

Simplified source and consolidated usage.

Change-Id: I662a94381f3b6119978a53308dc616e942259941

7 years agodemos: Wait for fences before destroying swapchain
Tony Barbour [Thu, 23 Mar 2017 19:25:36 +0000 (13:25 -0600)]
demos: Wait for fences before destroying swapchain

Addresses  GH #1048

Change-Id: Ie94796bcd13dc506e1b97c483763df9023567ac6

7 years agotests: Add test case for VkQueueFlags checks
Mike Schuchardt [Tue, 7 Mar 2017 21:40:28 +0000 (14:40 -0700)]
tests: Add test case for VkQueueFlags checks

Change-Id: I5917fb3fe0360e51cf88196bf5f7d0fe118940b9

7 years agotests: Add VkCommandPoolObj wrapper class
Mike Schuchardt [Thu, 2 Mar 2017 00:09:09 +0000 (17:09 -0700)]
tests: Add VkCommandPoolObj wrapper class

Add object to wrap VkCommandPool handle in testing framework.  Tests can
now create a custom command pool that works with the VkCommandBufferObj
wrapper.  Add utility function to VkDeviceObj that finds a queue family which
doesn't support a given capability.

Change-Id: I2f005249cc8650acf632f83ae5171de1b4509c8c

7 years agolayers: Add VU enums to VkQueueFlag checks
Mike Schuchardt [Thu, 23 Feb 2017 22:57:37 +0000 (15:57 -0700)]
layers: Add VU enums to VkQueueFlag checks

Split validation of command pool queue flag checks into a dedicated
function and add valid usage error enums.

Change-Id: I4fc4e71d96b818c281ad310dd0d15bca508efb94

7 years agolayers: GH1592, Fix unique_objects DebugMarker Ext
Mark Lobodzinski [Thu, 16 Mar 2017 17:54:35 +0000 (11:54 -0600)]
layers: GH1592, Fix unique_objects DebugMarker Ext

CodeGen ignored these APIs as they contain handles which are embedded
in a structure and aliased. Added manual coverage.

Change-Id: I81cf1945981a8e0b69966a9d0e190e49ff728ea8

7 years agolayers: Add image handles to layout error output
Mark Lobodzinski [Wed, 22 Mar 2017 19:06:12 +0000 (13:06 -0600)]
layers: Add image handles to layout error output

Also fixed up validation tests to handle message formatting changes.

Change-Id: I8671ae531d473bebdc034c33edcd9617ab96b836

7 years agolayers: Fill in core_validation log_msg handles
Mark Lobodzinski [Wed, 22 Mar 2017 13:37:04 +0000 (07:37 -0600)]
layers: Fill in core_validation log_msg handles

Also changed all object handle zero casts to use TYPE_UNKNOWN.

Change-Id: I212fd9dd50a25dec98d1fbf46caa73401450c89f

7 years agolayers: Fill in buffer_validation log_msg handles
Mark Lobodzinski [Tue, 21 Mar 2017 22:41:45 +0000 (16:41 -0600)]
layers: Fill in buffer_validation log_msg handles

Also updated some C-style casts and added TYPE_UNKNOWN where
appropriate.

Change-Id: Ia9c1d013dd73c4f6785df6151ee71715e310187b

7 years agoloader: Add guard around cmake header include.
Jamie Madill [Tue, 21 Mar 2017 17:48:13 +0000 (13:48 -0400)]
loader: Add guard around cmake header include.

This allows non-cmake platforms to compile the loader. Use a define
named VULKAN_NON_CMAKE_BUILD to disable CMAKE-specific features.

Change-Id: I6f6d8731fe1be60fd138e9fe1006c913fb029b47

7 years agolayers: Deep copy pQueueFamilyIndicies
Peter Lohrmann [Fri, 17 Mar 2017 23:58:14 +0000 (16:58 -0700)]
layers: Deep copy pQueueFamilyIndicies

IMAGE_STATE/BUFFER_STATE classes did not make deep copies of the
createinfo.pQueueFamilyIndices array, which could cause invalid
warnings to be reported to the user.

Change-Id: I7ebda777de9decb0c532a4999f78573460197fd7

7 years agolayers: Fix uses of KHR ifdef to KHX in objecttracker
Jamie Madill [Tue, 21 Mar 2017 17:46:11 +0000 (13:46 -0400)]
layers: Fix uses of KHR ifdef to KHX in objecttracker

In a few places, we were using VK_USE_PLATFORM_WIN32_KHR instead of
VK_USE_PLATFORM_WIN32_KHX.

Change-Id: I579ea848868396b9c2877e43ca24780476e55919

7 years agolayers:Refactor image layout verify/set
Tobin Ehlis [Wed, 15 Mar 2017 18:18:31 +0000 (12:18 -0600)]
layers:Refactor image layout verify/set

VerifyImageLayout had a side effect of setting image layout state if
the layout had not been seen by the cmd buffer. This update moves the
code to set the layout outside of the verify function and instead puts
it into new SetLayout* functions that are now called in the appropriate
PreCallRecord* functions.

Note that the previous behavior caused a side effect where layouts
could be updated even when the call down the chain did not occur.
The updated behavior will always update the layout to what is passed
as the explicit layout for any image copy operations whenever the
call down the chain is made. This is desirable b/c if the layout
didn't match the app saw the error during the Validate* portion of
the call and if they chose to ignore it then validation should
reflect the layout state of the image that was set by the call.

Since the side effect mentioned above is no longer present, this change
includes an update to InvalidImageLayout test where a second call to
vkCmdCopyImage() is made in order to actually transition the initial
image layout state so that expected errors are correct going fwd.

7 years agotests:Update InvalidImageLayout test
Tobin Ehlis [Tue, 14 Mar 2017 22:16:51 +0000 (16:16 -0600)]
tests:Update InvalidImageLayout test

Modify the expected error strings based on refactor.

7 years agolayers:Unify image layout validation functions
Tobin Ehlis [Tue, 14 Mar 2017 21:38:48 +0000 (15:38 -0600)]
layers:Unify image layout validation functions

VerifySourceImageLayout() and VerifyDestImageLayout() were nearly
identical so I generalized a couple of pieces and combined them in the
single VerifyImageLayout() function.

7 years agoheader: Update to 1.0.44 Vulkan version
Mark Lobodzinski [Tue, 21 Mar 2017 16:12:31 +0000 (10:12 -0600)]
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

7 years agolayers: swapchain queue family count tracking
Mike Schuchardt [Fri, 10 Mar 2017 21:12:35 +0000 (14:12 -0700)]
layers: swapchain queue family count tracking

Add vkGetPhysicalDeviceQueueFamilyProperties2KHR as an alternate way get
queue family count.

Change-Id: Ie0efee916a1bf091eb34c8610eec3c73943db846

7 years agolayers: swapchain post call record refactor
Mike Schuchardt [Fri, 10 Mar 2017 21:59:10 +0000 (14:59 -0700)]
layers: swapchain post call record refactor

Change-Id: Id4063c82d9e592f982c59fb12c6d9f06a9e7b35a

7 years agotests: Fix device specific failures
Jeremy Hayes [Mon, 20 Mar 2017 21:33:01 +0000 (15:33 -0600)]
tests: Fix device specific failures

Don't assume format is supported. Check it before use.

Change-Id: Ic74e0fa98612497e57b8264e2c1e025c0b9bd807

7 years agotests: Fix loader test build
Mark Young [Mon, 20 Mar 2017 19:08:52 +0000 (13:08 -0600)]
tests: Fix loader test build

The loader test build needed the appropriate #include defined
for more than just Windows platforms.

Change-Id: I434ba15586915cab4ce3784ca19a6a6f8f1f129a

7 years agotests: Filter loader specific error.
Jeremy Hayes [Fri, 17 Mar 2017 17:51:11 +0000 (11:51 -0600)]
tests: Filter loader specific error.

Change-Id: I09259f443c6268753fb2c46e77d725e204efc142

7 years agodocs: LX666 - Typos in Docs
Mark Young [Mon, 20 Mar 2017 14:27:14 +0000 (08:27 -0600)]
docs: LX666 - Typos in Docs

Fix issue brought up by Masaki Takano in LunarXchange.

Change-Id: Ib6caa931decf5976e96bcd4629602b7f25b88001

7 years agotests: Fix tests using incorrect initialization
Mark Lobodzinski [Fri, 17 Mar 2017 18:05:16 +0000 (12:05 -0600)]
tests: Fix tests using incorrect initialization

Change-Id: I9dc470fb5c4668760a3164242779705d6f4c8f22

7 years agolayers: Fix QueueBindSparse fence validation
Mark Lobodzinski [Fri, 17 Mar 2017 17:15:24 +0000 (11:15 -0600)]
layers: Fix QueueBindSparse fence validation

If bindInfoCount was 0 fence was not properly retired.

Change-Id: I2b6af38b0181d328eaf1bab2c2109f3492905aa0

7 years agolayers: Fix fence validation error in object_tracker
Mark Lobodzinski [Fri, 17 Mar 2017 16:52:57 +0000 (10:52 -0600)]
layers: Fix fence validation error in object_tracker

Change-Id: Id03f32f636cef14cb6d549d7c04b05cd5c814d52

7 years agolayers: Check use of CapabilityShaderDrawParameters against ext enable
Chris Forbes [Fri, 10 Mar 2017 03:48:51 +0000 (16:48 +1300)]
layers: Check use of CapabilityShaderDrawParameters against ext enable

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Pass whole layer_data down through more of SC
Chris Forbes [Fri, 10 Mar 2017 03:45:14 +0000 (16:45 +1300)]
layers: Pass whole layer_data down through more of SC

I know I'd done a bunch of work to reduce the dependency on layer_data
here before, but capability checking needs more broad access when
extensions gate capabilities. Adding yet another crazy parameter to the
intermediate functions just to avoid using layer_data here is silly.

Just plumb it all back through...

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Track if VK_KHR_shader_draw_parameters is enabled
Chris Forbes [Fri, 10 Mar 2017 03:21:55 +0000 (16:21 +1300)]
layers: Track if VK_KHR_shader_draw_parameters is enabled

We need to know this in order to determine whether the corresponding
shader capability is acceptable.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agonop: Clean up comments
Dave Houlton [Thu, 16 Mar 2017 19:18:15 +0000 (13:18 -0600)]
nop: Clean up comments

Change-Id: I392aba1398381205728aead48d6cfd10aa47ac90

7 years agolayers: Add VUs 1200&1201, and a test
Dave Houlton [Tue, 14 Mar 2017 17:31:20 +0000 (11:31 -0600)]
layers: Add VUs 1200&1201, and a test

Added 2 VU checks for aspectMask on image copy. Added
test CopyImageAspectMismatch to provoke these VUs, and
a handful of other aspect mask VUs previously done but
missing tests.

Change-Id: Ib9c3eb9d95a9295ec485bb14b4221d4198fa6904

7 years agolayers: Add VU 01185 and a test
Dave Houlton [Tue, 28 Feb 2017 20:16:02 +0000 (13:16 -0700)]
layers: Add VU 01185 and a test

Added check for valid usage 01185.  Added test
CopyImageSampleCountMismatch() to verify the check.

Change-Id: I51e76e0334bd4f1c0fe564f241646fc8b788da1e

7 years agobuild: Improve pkg-config to handle 64-bit distros
leigh123linux [Wed, 15 Mar 2017 09:59:36 +0000 (09:59 +0000)]
build: Improve pkg-config to handle 64-bit distros

Fixes #1582

Change-Id: I2f06a7016643f61d7e6341df20f355cb510350ab

7 years agotests: Add loader device group tests
Mark Young [Thu, 16 Mar 2017 19:56:32 +0000 (13:56 -0600)]
tests: Add loader device group tests

Add loader tests to evaluate the results returned by the new
vkEnumeratePhysicalDeviceGroupsKHX extension.

Change-Id: Ia5cf10d283be015080d48bb9e9bc4e84bf3b45b9

7 years agotests: Fix Maintenance1Tests to handle lack of extension
Tony Barbour [Thu, 16 Mar 2017 21:55:38 +0000 (15:55 -0600)]
tests: Fix Maintenance1Tests to handle lack of extension

Wait to create the device until the extension is known to be there

Change-Id: I3be8218cca439b7843133c1666cdb7119634cf49

7 years agoRevert "tests: Fail on unexpected errors"
Jeremy Hayes [Thu, 16 Mar 2017 19:32:05 +0000 (13:32 -0600)]
Revert "tests: Fail on unexpected errors"

This reverts commit bc230cab8dfa71848d4c81af8c6ce718e56d2711.

7 years agotests: Make Maintenance1Tests a positive test
Tony Barbour [Wed, 15 Mar 2017 22:19:02 +0000 (16:19 -0600)]
tests: Make Maintenance1Tests a positive test

Change-Id: Ibc0c9d103d56e92db84bc398237f3102d5b2ee72

7 years agotests: Move InitFramework call into Init function
Tony Barbour [Thu, 16 Mar 2017 18:09:08 +0000 (12:09 -0600)]
tests: Move InitFramework call into Init function

To get better control of instance creation, move the call to InitFramework
into a new Init function with InitState

Change-Id: I2b54b11f1206d6673c5b0496e639a1fdd10c0bba

7 years agolayers: Fix incorrect KHR/KHX ifdefs.
Jamie Madill [Thu, 16 Mar 2017 16:53:42 +0000 (12:53 -0400)]
layers: Fix incorrect KHR/KHX ifdefs.

In two places we were checking for the presence of the WIN32 KHR
define instead of the KHX define where the enums and methods are
defined.

Fixes #1593.

Change-Id: I0bf0c2e2ed734ed2c40a44c4cd7d468ba70ca9a4

7 years agotests: Add more loader alloc tests
Mark Young [Wed, 15 Mar 2017 16:36:03 +0000 (10:36 -0600)]
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

7 years agoloader: Fix vkEnumeratePhysicalDeviceGroupsKHX
Mark Young [Sat, 11 Mar 2017 00:31:18 +0000 (17:31 -0700)]
loader: Fix vkEnumeratePhysicalDeviceGroupsKHX

vkEnumeratePhysicalDeviceGroupsKHX was not properly generating the
physical device information or groups.  Several changes resolve
most of the issue, however, I'm still seeing issues when certain
layers enabled.

Change-Id: Id8d4553da25491a3d0a97e8d44e21340b41bc09c