platform/upstream/Vulkan-Tools.git
7 years agolayers: Remove unnecessary args from OT helper fcns
Mark Lobodzinski [Tue, 11 Apr 2017 19:57:45 +0000 (13:57 -0600)]
layers: Remove unnecessary args from OT helper fcns

Change-Id: I0deb4d43c83cd126d0d4bb4e158907148a6e3753

7 years agolayers: Object tracker variable renaming/clang-format
Mark Lobodzinski [Mon, 3 Apr 2017 17:36:40 +0000 (11:36 -0600)]
layers: Object tracker variable renaming/clang-format

Change-Id: Id39eea99003c58dc183f45d4164c852328bc9826

7 years agolayers: Some object tracker cleanup
Mark Lobodzinski [Mon, 3 Apr 2017 17:34:36 +0000 (11:34 -0600)]
layers: Some object tracker cleanup

Change-Id: I8d4d82d763289df9dd9834236fdb984922304f11

7 years agolayers: Fix parameter validation ext enable struct
Mark Lobodzinski [Wed, 12 Apr 2017 19:57:42 +0000 (13:57 -0600)]
layers: Fix parameter validation ext enable struct

Change-Id: I48c27be03e5ccb4621e7c7fb7b21bb0bf1d8bceb

7 years agolayers: Fix object tracker extension struct
Mark Lobodzinski [Wed, 12 Apr 2017 19:56:58 +0000 (13:56 -0600)]
layers: Fix object tracker extension struct

Change-Id: Iec29cc46df0f12d7e1da4daa18fb02d5023151b5

7 years agolayers: Allow UO to codegen vkAllocateMemory
Mark Lobodzinski [Tue, 11 Apr 2017 15:38:34 +0000 (09:38 -0600)]
layers: Allow UO to codegen vkAllocateMemory

This was a special case, manually written as it contained a pnext
extension chain containing Vulkan handles. Codegen now covers this
case.

Change-Id: I086d4314aeb9968c3f151e4e7134de7846c1c8d0

7 years agoscripts: Add extension unwrapping support routines
Mark Lobodzinski [Fri, 7 Apr 2017 21:31:35 +0000 (15:31 -0600)]
scripts: Add extension unwrapping support routines

Change-Id: I86f30aed8a35d91d4c08585210cc0571a27c7430

7 years agoscripts: Add pNext-chain extension helper function
Mark Lobodzinski [Thu, 6 Apr 2017 16:07:42 +0000 (10:07 -0600)]
scripts: Add pNext-chain extension helper function

Unique-objects layer did not handle extension structs or chains of
extension structs. Automated generation and handling of unwrapped
struct chains.

Change-Id: I8cc813c9bf7290bbcec257245848e54e1ce8a0f7

7 years agovulkaninfo: Add missing case for CPU device
Chris Forbes [Wed, 12 Apr 2017 00:22:51 +0000 (17:22 -0700)]
vulkaninfo: Add missing case for CPU device

Fixes #1664

7 years agoscripts: Defer unique_objects processing
Mark Lobodzinski [Thu, 6 Apr 2017 21:22:07 +0000 (15:22 -0600)]
scripts: Defer unique_objects processing

Codegen created wrap/unwrap code on the fly as commands were processed
by the XML. Deferred codegen until all the data was complete and
collected.

Change-Id: I295ab59ad5dd24a5321e348cb18f96f2d0eed824

7 years agoheader: Update to 1.0.47 Vulkan version
Mark Lobodzinski [Mon, 10 Apr 2017 14:02:29 +0000 (08:02 -0600)]
header: Update to 1.0.47 Vulkan version

- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated vulkan.hpp

Change-Id: I0da07ad3d623d0f249593fa2d7d8e336e6ee8ad7

7 years agolayers:Refactor image layout validation
Tobin Ehlis [Fri, 17 Feb 2017 22:17:04 +0000 (15:17 -0700)]
layers:Refactor image layout validation

Streamline some of the image layout validation code. At the time of
CmdBeginRenderPass() remove the layout transition from validation code
and perform the layout transitions all at once.
This allows a bit of transition code to be killed so that the initial
transition code can share TransitionSubpassLayouts() function.

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 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 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 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 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 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 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 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 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 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 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 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 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 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

7 years agotests: Fix ImageLayerUnsupportedFormat errors
Jeremy Hayes [Tue, 14 Mar 2017 20:04:19 +0000 (14:04 -0600)]
tests: Fix ImageLayerUnsupportedFormat errors

Fix ImageLayerUnsupportedFormat unexpected errors.

Change-Id: I7dd4f2b9bae69885abf5031a6257ee3f6fad21fb

7 years agobuild: Fix potentially uninitialized VS2015 warning
Jamie Madill [Wed, 15 Mar 2017 20:17:46 +0000 (16:17 -0400)]
build: Fix potentially uninitialized VS2015 warning

This fixes the a few occurences in demos, the loader and a test.
It also adds the warning to the always-on list so it will prevent
future regressions.

Fixes #1587.

Change-Id: I26f69e977b57749a3ab4ddb548ada95384131edc

7 years agolayers: Fix CTS BufferView UpdateTemplate crash
Mark Lobodzinski [Wed, 15 Mar 2017 19:13:49 +0000 (13:13 -0600)]
layers: Fix CTS BufferView UpdateTemplate crash

Change-Id: I2d03265b465ffc869f52ca85e6ad23301424a8d7

7 years agodemos: Select alpha based on capabilities in cube
Tony Barbour [Tue, 14 Mar 2017 14:55:46 +0000 (08:55 -0600)]
demos: Select alpha based on capabilities in cube

Change-Id: I44e3654ee8d2f1b127284ae5f66ca75cb9ff54a7

7 years agodemos:Add cube option --validate-checks-disabled
Tobin Ehlis [Tue, 14 Mar 2017 17:29:01 +0000 (11:29 -0600)]
demos:Add cube option --validate-checks-disabled

Added option to cube demo "--validate-checks-disabled".
This option will use the VK_EXT_validation_flags extension to cause
validation to skip all validation flags that have a flag.
This is meant to provide a basic test for the VK_EXT_validation_flags
extension and find any obvious bugs/crashes.

7 years agolayers:Connect VK_EXT_validation_flags
Tobin Ehlis [Tue, 14 Mar 2017 17:22:50 +0000 (11:22 -0600)]
layers:Connect VK_EXT_validation_flags

Add support for VK_EXT_validation_flags in core_validation.
The only enum currently supported is VK_VALIDATION_CHECK_ALL_EXT which
disables all existing flags in validation. Note that most checks are
still not guarded by flags so that option will only disable the checks
that are guarded by flags.

In testing this I found a bug with AllocateDescriptorSets() where
common state was not updated with the flag enabled so this includes a
fix for that issue as well.

7 years agobuild: Add uninstall target for Linux
Karl Schultz [Tue, 14 Mar 2017 23:11:24 +0000 (17:11 -0600)]
build: Add uninstall target for Linux

Change-Id: I0addef3265b5a2b5ec7b902d9c0086725a2ebb15

7 years agobuild: Add pkgconfig file for the Vulkan loader
Karl Schultz [Fri, 10 Mar 2017 21:58:10 +0000 (14:58 -0700)]
build: Add pkgconfig file for the Vulkan loader

Fixes #757
On Linux, the build configures a vulkan.pc pkgconfig
file, writing it to <build_dir>/loader.  The make 'install'
target then installs this file along with the others so that
it can be found with pkg-config.  Then, issuing:
$ pkg-config --libs --cflags vulkan
emits compilation flags for vulkan programs.

Since retrieving the header version from vulkan.h was needed in
order to put the Version in the pc file, this commit also uses
the header version to specify the SO version, so it no longer needs
to be changed for every release.

Change-Id: If83c17bfbb59f2ee05d5f86f5e957fc11871546b

7 years agotests: Negative tests for VU 00303-00308
Mike Weiblen [Wed, 8 Mar 2017 05:18:40 +0000 (22:18 -0700)]
tests: Negative tests for VU 00303-00308

Add VU testing to VkLayerTest/InvalidBarriers() test case.

Add some comments.

Add getter method to vktestbinding.h

Change-Id: Ib7f3a0f9a54b6612e2082e2160a671fb12aae687

7 years agolayers: Implement VU 00303-00308
Mike Weiblen [Wed, 8 Mar 2017 05:18:27 +0000 (22:18 -0700)]
layers: Implement VU 00303-00308

Implement Valid Usages 00303-00308 with new function
ValidateBarrierLayoutToImageUsage() which verifies an
ImageMemoryBarrier's old/new ImageLayouts are compatible with its
Image's ImageUsageFlags.

Rename ValidateImageLayouts() to ValidateBarriersToImages().

Rename some variables:
- internal vars to use Google style.
- vars passed verbatim from Vulkan to use Vulkan names.

Fix issues revealed in layer tests due to these new checks:
- 2 new Unexpected messages in VkLayerTest.
- 1 failing VkPositiveTest.

Update VU database for check_implemented = Y.

Change-Id: I8723f99d515fbea707299b4d1fcf33a4da6b7b0b

7 years agoMerge pull request #1578 from KhronosGroup/stroyan_loader_json_init
Mike Stroyan [Tue, 14 Mar 2017 22:26:24 +0000 (16:26 -0600)]
Merge pull request #1578 from KhronosGroup/stroyan_loader_json_init

loader: Initialize json_version

7 years agoheader: Update to 1.0.43 header version
Mark Lobodzinski [Tue, 14 Mar 2017 16:12:43 +0000 (10:12 -0600)]
header: Update to 1.0.43 header version

  - updated include/vulkan/vulkan.h
  - updated scripts/cgenerator.py
  - updated scripts/vk.xml
  - updated layers json files
  - updated tests json files
  - updated loader SOVERSION
  - updated include/vulkan/vulkan.hpp
  - updated parameter_validation.cpp with new APIs
  - updated object_tracker.cpp with new APIs

Change-Id: I1fd812cb376d5cddee5ab4acf2e4f8fe6d33b761

7 years agolayers: Remove deprecated KHX extension from OT/PV
Mark Lobodzinski [Tue, 14 Mar 2017 16:31:48 +0000 (10:31 -0600)]
layers: Remove deprecated KHX extension from OT/PV

Deleted references to GetPhysicalDeviceImageFormateProperties2KHX
and GetPhysicalDeviceProperties2KHX from object_tracker and
parameter_validation.

Change-Id: I83e29bae8302dad6f774886d8472451220b426d2