platform/upstream/Vulkan-Tools.git
6 years agodemos: Add extension support to vulkaninfo
Jeremy Kniager [Wed, 28 Jun 2017 17:46:10 +0000 (11:46 -0600)]
demos: Add extension support to vulkaninfo

Change-Id: I7b9c729a90571d2888d7a22a9899546c547e6153

6 years agolayers:Update descriptor state earlier
Tobin Ehlis [Thu, 20 Jul 2017 14:38:33 +0000 (08:38 -0600)]
layers:Update descriptor state earlier

This change arises from an issue reported by Alon at Samsung. He
reports that a driver bug is modifying the descriptor set state on
UpdateDescriptorSets() call, so the data is getting corrupted in
validation. Since UpdateDescriptorSets() is a void function, it
doesn't make a difference in validation if we update state before or
after the call, since the call itself won't change the state being
updated. It actually saves us a lock call to update pre-call.

7 years agotests:Test invalid renderPass bufferMemoryBarrier
Tobin Ehlis [Wed, 19 Jul 2017 19:47:58 +0000 (13:47 -0600)]
tests:Test invalid renderPass bufferMemoryBarrier

Test case where VkBufferMemoryBarrier is incorrectly issued within a
renderPass.

Kill old code that was doing the same check/test w/o the VUID.

7 years agotests:Test barrier dependencyFlags mis-match
Tobin Ehlis [Wed, 19 Jul 2017 19:20:01 +0000 (13:20 -0600)]
tests:Test barrier dependencyFlags mis-match

This is VUID VALIDATION_ERROR_1b800932. Case where barrier
dependencyFlags mis-matches subpass dependency dependencyFlags.
Also update VU DB.

7 years agolayers:Add image mem barrier access mask checks
Tobin Ehlis [Wed, 19 Jul 2017 17:11:52 +0000 (11:11 -0600)]
layers:Add image mem barrier access mask checks

Complete remaining work for VALIDATION_ERROR_1b80092e and
VALIDATION_ERROR_1b800930. Make sure the image memory barriers src/dst
access masks are a subset of corresponding subpass self-dependency
access masks.

7 years agolayers:Validate bufferMemoryBarrierCount
Tobin Ehlis [Wed, 19 Jul 2017 16:41:29 +0000 (10:41 -0600)]
layers:Validate bufferMemoryBarrierCount

This is VU VALIDATION_ERROR_1b800934.
For a barrier in renderPass, bufferMemoryBarrierCount must be zero.

7 years agolayers:Validate barrier dependencyFlags
Tobin Ehlis [Wed, 19 Jul 2017 16:24:29 +0000 (10:24 -0600)]
layers:Validate barrier dependencyFlags

This is VUID VALIDATION_ERROR_1b800932. Verify that an barrier in a
renderPass has a dependencyFlags value that matches the corresponding
subpass self-depenency dependencyFlags value.

7 years agowinsdk: Hide runtime in programs and features
Lenny Komow [Tue, 18 Jul 2017 17:20:05 +0000 (11:20 -0600)]
winsdk: Hide runtime in programs and features

Change-Id: Ibc5028f660c91f66d986af19f6c7959eb9b55359

7 years agoloader: Fix vkEnumerateDeviceLayerProperties
Mark Young [Fri, 14 Jul 2017 23:11:31 +0000 (17:11 -0600)]
loader: Fix vkEnumerateDeviceLayerProperties

The device layers should list the names of the original layers
enabled during vkCreateInstance.  We were expanding the
meta-layers which caused there to be a mismatch in names.

NOTE: that this list still include Implicit and Environment
variable enabled layers since those are techincally enabled at
vkCreateInstance as well.

Change-Id: I3ef88623e96a12a8f18f8f04e95a6f5444f4be56

7 years agolayers: Update object_tracker var/func names
Mark Lobodzinski [Tue, 18 Jul 2017 19:15:47 +0000 (13:15 -0600)]
layers: Update object_tracker var/func names

Change-Id: Iacc0cb2676cd2346879d7d51e91b9b75232d5ad4

7 years agolayers: Reorganize ObjectTracker for future codegen
Mark Lobodzinski [Thu, 6 Jul 2017 21:28:11 +0000 (15:28 -0600)]
layers: Reorganize ObjectTracker for future codegen

Moved to-be-generated source to object_tracker.cpp, manually-
written and helper functions to object_tracker_utils.cpp (new
file), and reworked header. Updated doc validator to search
new file.

Change-Id: I0fd3bcc4f6d123db07c7f8e2633e6fe16833e231

7 years agolayers:Handle ALL_*_BIT pipe stage barrier validation
Tobin Ehlis [Tue, 18 Jul 2017 17:22:08 +0000 (11:22 -0600)]
layers:Handle ALL_*_BIT pipe stage barrier validation

Update barrier validation to handle VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT
and VK_PIPELINE_STAGE_ALL_COMMANDS_BIT cases in the subpass dependency.
Expand GFX bit as it's an alias for a fixed set of bits. If
ALL_COMMANDS is specified then skip validation because we know that
barrier mask must be a subset of subpass mask.

7 years agotests:Update self-dependency tests
Tobin Ehlis [Tue, 18 Jul 2017 15:41:27 +0000 (09:41 -0600)]
tests:Update self-dependency tests

Move renderPass barrier w/o self-dependency test from InvalidBarriers
to RenderPassBarrierConflicts test case. This prevents having to
re-created the default renderPass in InvalidBarriers test.
Also update framework subpass with self-dependency to set a group of
gfx pipe/access masks instead of EVERY mask, which is not allowed.

7 years agotests:Update RenderPassBarrierConflicts
Tobin Ehlis [Mon, 17 Jul 2017 21:08:54 +0000 (15:08 -0600)]
tests:Update RenderPassBarrierConflicts

Add accessMask tests to RenderPassBarrierConflicts. Hit the two cases
where src & dstAccessMasks from pMemoryBarriers are mis-matched from
VkSubpassDependency.

7 years agolayers:Add barrer access mask checks
Tobin Ehlis [Mon, 17 Jul 2017 20:49:12 +0000 (14:49 -0600)]
layers:Add barrer access mask checks

Verify that src/dstAccessMask from pMemoryBarriers is a subset of the
corresponding mask from the relevant VkSubpassDependency instance.

7 years agolayers:Fix copy-paste dstStageMask print bug
Tobin Ehlis [Mon, 17 Jul 2017 20:03:12 +0000 (14:03 -0600)]
layers:Fix copy-paste dstStageMask print bug

Fix this copy-and-pasted error message by changing src->dst.

7 years agolayers:Refactor barrier validation
Tobin Ehlis [Mon, 17 Jul 2017 16:14:27 +0000 (10:14 -0600)]
layers:Refactor barrier validation

Migrate validation for renderpass barrier in CmdPipelineBarrier to its
own function. Refactor some device and command buffer params to avoid
duplicate look-ups. Add some const decls to command buffer state that
shouldn't change down the pre-call path.

7 years agoheader: Update to version 1.0.55 of the Vulkan hdr
Mark Lobodzinski [Mon, 17 Jul 2017 20:26:47 +0000 (14:26 -0600)]
header: Update to version 1.0.55 of the Vulkan hdr

- updated vulkan.h
- updated generator.py
- updated reg.py
- updated vk.xml
- updated Win/Lin json files
- fixed and updated vulkan.hpp
- updated validation error messages and database
- applied validextensionstruct fixes from 1.0.54 LVL vk.xml file
- fixed parameter_validation DebugMarker prototypes
- fixed unique_objects DebugMarker prototypes
- fixed NV_FILL_RECTANGLE in error DB
- updated error database with new covered VUs

Change-Id: I4eec816a6dc9756105a357beab6af4abb303994d

7 years agoloader: Do not enumerate extensions from disabled implicit layers
Jean-Francois Roy [Thu, 6 Jul 2017 21:10:13 +0000 (14:10 -0700)]
loader: Do not enumerate extensions from disabled implicit layers

This patch adds a check to vkEnumerateInstanceExtensionProperties to
omit extensions provided by disabled implicit layers. Per section 31.2
(1.0.51), "When pLayerName parameter is NULL, only extensions provided
by the Vulkan implementation or by implicitly enabled layers are
returned." Arguably, implicit layers that have been disabled are not
"implicitly enabled".

7 years agolayers:Add checks for barrier stage masks
Tobin Ehlis [Thu, 13 Jul 2017 22:51:30 +0000 (16:51 -0600)]
layers:Add checks for barrier stage masks

Verify that the src & dst stage masks for a subpass barrier are a
subset of the subpass dependency's src & dst masks respectively.

Add RenderPassBarrierConflicts test to hit these cases. This test hits
the two cases of an image barrier src/dst masks not being a subset of
their corresponding subpass dependency masks.

Update database file to reflect that these checks are implemented and
that this test covers them.

7 years agoscripts:Update VUID Database
Tobin Ehlis [Thu, 13 Jul 2017 19:48:04 +0000 (13:48 -0600)]
scripts:Update VUID Database

VALIDATION_ERROR_1b800928 is implemented and tested in InvalidBarriers.

7 years agolayers:Add subpass barrier self-dependency VUID
Tobin Ehlis [Thu, 13 Jul 2017 19:07:39 +0000 (13:07 -0600)]
layers:Add subpass barrier self-dependency VUID

This is VALIDATION_ERROR_1b800928. Add the ID and slightly touch up the
error language. Also, this check should be general for any barrier
that's inserted for a renderPass so remove extra memBarrierCount
condition.

7 years agolayers:Handle deleted image view in descriptor
Tobin Ehlis [Fri, 14 Jul 2017 17:25:21 +0000 (11:25 -0600)]
layers:Handle deleted image view in descriptor

When an image descriptor with a destroyed image view was used we hit an
assert. This is not caught upstream and can occur if a descriptor is
re-used following image view deletion. Add code to catch this case
and report the destroyed image view.

7 years agolayers: GH1933, Check for mutually exclusive exts
Mark Lobodzinski [Fri, 7 Jul 2017 18:05:28 +0000 (12:05 -0600)]
layers: GH1933, Check for mutually exclusive exts

Add check for Maintenance1 and negative_viewport_height extensions being
enabled simultaneously, along with test and a database update.

Change-Id: Id44f2a322fd32883d8b6d7ff1dab56996dec76c7

7 years agodemos: Add Wayland input handling to smoketest
Joey Bzdek [Wed, 7 Jun 2017 20:22:39 +0000 (14:22 -0600)]
demos: Add Wayland input handling to smoketest

Change-Id: I82cd3f004410dea1d173ef8022091d6f4463d0f5

7 years agodemos: Clang-format Wayland and cube.cpp refactor
Joey Bzdek [Wed, 14 Jun 2017 16:33:36 +0000 (10:33 -0600)]
demos: Clang-format Wayland and cube.cpp refactor

Change-Id: I73dac6489e41a94fc53a1c7942888a3a6479a805

7 years agodemos: Add Wayland input handling to cube
Joey Bzdek [Wed, 7 Jun 2017 15:40:36 +0000 (09:40 -0600)]
demos: Add Wayland input handling to cube

Change-Id: I314ad9bc3e297da93f4d5c1d44289c9cca3a8fde

7 years agodemos: Refactored Demo class in cubepp
Joey Bzdek [Wed, 7 Jun 2017 15:37:37 +0000 (09:37 -0600)]
demos: Refactored Demo class in cubepp
Moved 'Demo' declaration to near the top of the file to avoid referencing
problems.

Change-Id: I084231ada5683971baa073f1b761ac214fa02cfd

7 years agoexternal: Update commit IDs: spirv-tools
Cort [Fri, 14 Jul 2017 12:30:30 +0000 (05:30 -0700)]
external: Update commit IDs: spirv-tools

This fixes an MSVC compiler warning that's treated as an error
(and breaks the external sources build on Windows).

7 years agobuild: Fix loader/layer fallthrough warning
Mark Young [Wed, 12 Jul 2017 16:06:19 +0000 (10:06 -0600)]
build: Fix loader/layer fallthrough warning

Change-Id: I04d563caa9000ccbfd5e6e509bf65ceaed9e388a

7 years agolayers: Update PV codegen for Windows warning
Mike Schuchardt [Wed, 12 Jul 2017 16:10:01 +0000 (10:10 -0600)]
layers: Update PV codegen for Windows warning

Code gen declarations of allowed_structs in nested scopes could cause
warnings in Windows.  Modified codegen to append the type name to
allowed_structs (eg allowed_structs_VkGraphicsPipelineCreateInfo) to
avoid name collisions.

Change-Id: I40bd57ff34dcd1df01d3606c79dacbe06b00f464

7 years agoheader: Update to 1.0.54 Vulkan release
Mark Young [Fri, 7 Jul 2017 13:59:56 +0000 (07:59 -0600)]
header: Update to 1.0.54 Vulkan release

Update the headers and xml file with the latest spec changes for
Vulkan 1.0.54.  Also, make corresponding loader and layer changes
to support the new extensions.

Change-Id: I11273c5e3e828743f904e4f0b4b2f2c3a7804df0

7 years agolayers:Refactor CmdUpdateBuffer to Pre/Post
Tobin Ehlis [Tue, 11 Jul 2017 17:24:22 +0000 (11:24 -0600)]
layers:Refactor CmdUpdateBuffer to Pre/Post

Refactoring CmdUpdateBuffer function to use the Pre/Post call pattern.
Updated the pre-path so that command buffer state pointer is const
throughout. Pulled the state update code into the post function.

Note that this slightly deviates from the previous pattern by doing
object state look-up in top-level function instead of passing a ptr to
a ptr to Pre* function and having it do the object state look-up.
I prefer this method as it allows const* throughout the Pre* call chain
and avoids the ptr derefs in Pre* function. I'm open to discussion if
others prefer the alternate method however.

7 years agolayers: Remove spammy debug output in vkCmdBindDescriptorSets
Gabríel Arthúr Pétursson [Sun, 9 Jul 2017 17:47:38 +0000 (17:47 +0000)]
layers: Remove spammy debug output in vkCmdBindDescriptorSets

7 years agolayers:Identify layout from pipelineLayout
Tobin Ehlis [Thu, 6 Jul 2017 22:50:10 +0000 (16:50 -0600)]
layers:Identify layout from pipelineLayout

When checking IsCompatible() for a DescriptorSetLayout, the passed-in
layout is always from a pipelineLayout, however this was not specified
in the code. Add comment to specify this usage and update the error
message to always distinguish which of the layouts using in the compare
is from the pipelineLayout.

7 years agoexternal: Update commit IDs: glslang
Mike Weiblen [Fri, 7 Jul 2017 03:24:18 +0000 (21:24 -0600)]
external: Update commit IDs: glslang

Change-Id: I2e635bed2d132f636ab19739693d252e495ea648

7 years agolayers: Clarify MaxAnisotropy not enabled message
Mark Lobodzinski [Thu, 6 Jul 2017 17:42:29 +0000 (11:42 -0600)]
layers: Clarify MaxAnisotropy not enabled message

Folks continue to confuse 'enabled' with 'supported', expecially on
this particular feature.

Change-Id: I73df704436a95c9c47194169a53602b87b422174

7 years agoexternal: Update commit IDs: glslang,tools,header
Mike Weiblen [Fri, 30 Jun 2017 18:20:14 +0000 (12:20 -0600)]
external: Update commit IDs: glslang,tools,header

Update of external reference commit ids.

Change-Id: Iaa004adc60d8b41c5d894476103453491ed54535

7 years agoRevert "external: Update commit IDs: glslang,tools,header"
Mike Weiblen [Wed, 5 Jul 2017 22:46:28 +0000 (16:46 -0600)]
Revert "external: Update commit IDs: glslang,tools,header"

While trying to determine cause of TravisCI failures, back out the
update of LVL externals.

This reverts commit 6f607ea84a2226496628842fab1ed130be355536.

7 years agoloader: Rename files to better reflect their use
Lenny Komow [Mon, 3 Jul 2017 20:48:38 +0000 (14:48 -0600)]
loader: Rename files to better reflect their use

Change-Id: Ie3df06c1c4f78cd515cb4579e93bd80331913669

7 years agoloader: Fix unknown device trampolines on Windows
Lenny Komow [Fri, 30 Jun 2017 22:23:26 +0000 (16:23 -0600)]
loader: Fix unknown device trampolines on Windows

Change-Id: I33129c1d80d7c1d1615b7b86a7abfae1c33d0204

7 years agoloader: Fix unknown device trampolines on Linux
Lenny Komow [Thu, 29 Jun 2017 21:26:20 +0000 (15:26 -0600)]
loader: Fix unknown device trampolines on Linux

Change-Id: I69d12159534a4569dd2335b4fc52e9ba0bc004b0

7 years agoloader: Fix unknown phys dev terms on Linux
Lenny Komow [Thu, 29 Jun 2017 17:11:16 +0000 (11:11 -0600)]
loader: Fix unknown phys dev terms on Linux

Change-Id: I36f683c7deb4aac27b27ca253c3324439eb2f2f2

7 years agoloader: Fix unknown phys dev terms on Windows
Lenny Komow [Fri, 16 Jun 2017 22:42:46 +0000 (16:42 -0600)]
loader: Fix unknown phys dev terms on Windows

Change-Id: I04636aef6ebfcc092d58971574ba5fa0359e08d0

7 years agoexternal: Update commit IDs: glslang,tools,header
Mike Weiblen [Fri, 30 Jun 2017 18:20:14 +0000 (12:20 -0600)]
external: Update commit IDs: glslang,tools,header

Update of external reference commit ids.

Change-Id: Iaa004adc60d8b41c5d894476103453491ed54535

7 years agolayers: GH1922, Fix out-of-tree builds
Mark Lobodzinski [Mon, 3 Jul 2017 21:50:39 +0000 (15:50 -0600)]
layers: GH1922, Fix out-of-tree builds

Change-Id: I82bd4d1285a7ec69c7b8209937235f538375773a

7 years agolayers: Add VUIDS to allocator checks
Mark Lobodzinski [Wed, 28 Jun 2017 20:46:14 +0000 (14:46 -0600)]
layers: Add VUIDS to allocator checks

Change-Id: If4c37b631de1564dc56bcb1aa69e356538618acb

7 years agolayers: Add VUs to more PV struct-type_array checks
Mark Lobodzinski [Wed, 28 Jun 2017 20:23:22 +0000 (14:23 -0600)]
layers: Add VUs to more PV struct-type_array checks

Change-Id: I9aa1ea41550d24113117d40617689688b96227db

7 years agolayers: Output VUIDS for PV required_pointer checks
Mark Lobodzinski [Wed, 28 Jun 2017 19:22:03 +0000 (13:22 -0600)]
layers: Output VUIDS for PV required_pointer checks

Change-Id: I5b1a9901fdd75b35455fadd749b6ccb31236d23a

7 years agolayers: Add missing parms to vuid_mapping script
Mark Lobodzinski [Wed, 28 Jun 2017 19:21:27 +0000 (13:21 -0600)]
layers: Add missing parms to vuid_mapping script

Change-Id: I81e0366e7e2cb2054d8b0f706863e932ef4b8318

7 years agolayers: Wire up zerobitmask PV VUIDs
Mark Lobodzinski [Wed, 28 Jun 2017 18:06:41 +0000 (12:06 -0600)]
layers: Wire up zerobitmask PV VUIDs

Change-Id: Ib9ca0c6b57c4c8faceb9e502c6008624efe8ad23

7 years agolayers: Wire up ranged-enum PV VUIDs
Mark Lobodzinski [Wed, 28 Jun 2017 17:47:22 +0000 (11:47 -0600)]
layers: Wire up ranged-enum PV VUIDs

Change-Id: I334357b239a6f2ad28fad226306897606814095a

7 years agolayers: Wire in VUIDS for count/array implicit checks
Mark Lobodzinski [Wed, 28 Jun 2017 16:54:55 +0000 (10:54 -0600)]
layers: Wire in VUIDS for count/array implicit checks

Change-Id: I7957ffe9696f86d1a4cc402b612884e6bd2aa590

7 years agoscripts: Update vuid_mapping for missing variables
Mark Lobodzinski [Wed, 28 Jun 2017 16:54:26 +0000 (10:54 -0600)]
scripts: Update vuid_mapping for missing variables

Change-Id: I762509eb848351db7cd5fffbddbac94f8f8aaf0b

7 years agoheader: Update to version 1.0.53 of the vulkan hdr
Mark Lobodzinski [Wed, 28 Jun 2017 20:58:27 +0000 (14:58 -0600)]
header: Update to version 1.0.53 of the vulkan hdr

- updated vulkan.h
- updated reg.py
- updated vk.xml
- updated vk_validation_error_database.txt
- updated vk_validation_error_messages.h
- updated vuid_mapping.py
- updated vulkan.hpp
- fixed error database vuid parser issue
- updated error DB with new VUIDS

Change-Id: I4744f4278981cf808b1b3c9fcf9cf6f5793f1338

7 years agobuild: Fix build on non-x86 Linux systems
Lenny Komow [Thu, 29 Jun 2017 21:40:12 +0000 (15:40 -0600)]
build: Fix build on non-x86 Linux systems

Change-Id: I5a35e1bb5f1f9bf9b773588e1a20c24da78ddc35

7 years agolayers: More CmdBlitImage VU checks
Dave Houlton [Fri, 9 Jun 2017 23:08:32 +0000 (17:08 -0600)]
layers: More CmdBlitImage VU checks

Add 11 more VU checks to CmdBlitImage.  Fix layer_validation_tests
errors exposed by these new checks, add new tests for the new checks.
Update database file and clang-format the modified source files.

Change-Id: I3457dd0a31e04ab001bc8fb5bf638eb3f990f5d9

7 years agodemos: Use do-while instead of clunky while
Tony Barbour [Thu, 29 Jun 2017 19:34:41 +0000 (13:34 -0600)]
demos: Use do-while instead of clunky while

When acquiring swapchain images

Change-Id: I8c502e06490f73fc5c9cd8057cd12869a66ea942

7 years agolayers: Add names to objects and print in validation
Tony Barbour [Mon, 19 Jun 2017 22:50:37 +0000 (16:50 -0600)]
layers: Add names to objects and print in validation

Change-Id: Ie6587c26c8528ffac5698b8cb3ca2c4cc86b1dfd

layers: Fill out the rest of debug marker calls

Change-Id: I0c4085e36e5c06e11c0c09d1ca126ae6db35526d

7 years agoloader: Add validation for apiVersion
Mark Young [Wed, 19 Apr 2017 01:52:18 +0000 (19:52 -0600)]
loader: Add validation for apiVersion

Add a check to determine if the API version being requested can be
handled by the loader.  If it can't, then we return incompatible driver.
If we can, we continue along our merry way.

An addendum is that we also bumped the Loader/ICD interface version.
This was requested by Nvidia so that the ICDs know that we pay attention
to the version in the loader.  If they don't see the new Loader/ICD
interface version, they will handle the failing on all non-1.0 API
requests.

Change-Id: Icb7dd45e754c9f6a6c8186198333bacc68077b93

7 years agolayers: Update error db for missed check
Mark Lobodzinski [Wed, 28 Jun 2017 17:50:42 +0000 (11:50 -0600)]
layers: Update error db for missed check

Was causing CI to fail.

Change-Id: I38a86432718ff21dd7cf58055b55102190c76937

7 years agolayers: Add VUIDs for some -parameter implicit checks
Mark Lobodzinski [Tue, 27 Jun 2017 19:22:05 +0000 (13:22 -0600)]
layers: Add VUIDs for some -parameter implicit checks

Modified generator script and updated the VUID database.

Change-Id: I78da826981521170f1fa620ca0b91be0d4624cc7

7 years agoscripts: Add missing funcs/structs to mapping table
Mark Lobodzinski [Tue, 27 Jun 2017 19:21:03 +0000 (13:21 -0600)]
scripts: Add missing funcs/structs to mapping table

Change-Id: I124e31e436ec193a6bf55348654c6a99e6daeadc

7 years agolayers: Plumb in PV implicit requiredbits vuids
Mark Lobodzinski [Mon, 26 Jun 2017 22:27:15 +0000 (16:27 -0600)]
layers: Plumb in PV implicit requiredbits vuids

Change-Id: I6a9296d7f7bd73bf90855b32c522ab9d2b8bb04a

7 years agoscripts: Add missing variable names to vuid_mapping
Mark Lobodzinski [Mon, 26 Jun 2017 22:04:27 +0000 (16:04 -0600)]
scripts: Add missing variable names to vuid_mapping

Change-Id: Ib6fb0e6d9bb7d2a75bb0bd751a2ec75a161569ea

7 years agoscripts: Output VUID for PV pNext errors
Mark Lobodzinski [Mon, 26 Jun 2017 20:03:16 +0000 (14:03 -0600)]
scripts: Output VUID for PV pNext errors

Change-Id: I79be1658f827682330e1a9ea6abd9931b0121211

7 years agolayers: Add VUID parameter to pNext validation
Mark Lobodzinski [Mon, 26 Jun 2017 19:05:57 +0000 (13:05 -0600)]
layers: Add VUID parameter to pNext validation

In parameter_validation, plumbed VUID value through to validation
routine, added VUIDs for manual PV functions, updated generator to
compute correct VUID.

Change-Id: Ida15c874ba63826902fe93869cecac87415e0259

7 years agoscripts: Update vuid_mapping for missing structs
Mark Lobodzinski [Mon, 26 Jun 2017 19:05:22 +0000 (13:05 -0600)]
scripts: Update vuid_mapping for missing structs

Change-Id: I7f3850738de4ac7bf5dc0bc58285267c3e6044ae

7 years agolayers: Clarify message for unknown pNext type
Mark Lobodzinski [Mon, 26 Jun 2017 17:32:30 +0000 (11:32 -0600)]
layers: Clarify message for unknown pNext type

Change-Id: I6f7ed5cdfc20401237833c670a8bbc83ce98579e

7 years agobuild: Enable control flow guard on Windows
Slawomir Cygan [Wed, 14 Jun 2017 17:15:31 +0000 (19:15 +0200)]
build: Enable control flow guard on Windows

This enables the 'Control Flow Guard' security feature, which
prevents memory corruption vulnerabilites by placing a restriction
on where application can execute from.

The change is applied to both VulkanRT and it's NSIS installer.

WARN:  This change requires re-patching and rebuillding NSIS with
attached patch.
WARN#2: This change requires Visual Studion 2015 or vs140 toolset to
take effect.

Control Flow Guard documentation:
https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065(v=vs.85).aspx

Change-Id: I7683c0570087d994961c79fb64419509f83536a8

7 years agolayers: Don't copy all the image subresources every submit
Chris Forbes [Tue, 27 Jun 2017 00:57:39 +0000 (17:57 -0700)]
layers: Don't copy all the image subresources every submit

The set of subresources touched by this submission is likely to be very
small compared to the complete set we're tracking. It doesn't make any
sense to copy this entire hashtable in each submit call.

Instead, maintain an overlay table with the submission's modifications
in it.

Saves approx 12s in an internal workload.

7 years agolayers: Declare aliases for std::mutex and its RAII wrappers
Chris Forbes [Mon, 26 Jun 2017 19:11:16 +0000 (12:11 -0700)]
layers: Declare aliases for std::mutex and its RAII wrappers

I want to be able to swap out std::mutex for something the VS
concurrency profiler can see, so let's get all the mentions of it to one
place.

7 years agoscripts: Updated validation_stats error output
Mark Lobodzinski [Tue, 27 Jun 2017 15:38:15 +0000 (09:38 -0600)]
scripts: Updated validation_stats error output

Change-Id: I41f592c8fa7a9180d5bd07446d965fa9eb287558

7 years agolayers: Add sType VUIDs to Parameter Validation
Mark Lobodzinski [Wed, 21 Jun 2017 18:21:45 +0000 (12:21 -0600)]
layers: Add sType VUIDs to Parameter Validation

- Updated validation check to accept VUID
- Modified PV codegen to calculate VUIDs for sType checks
- Modified PV codegen to verify VUIDs are valid enums before using
- Updated error database for 65 new VUIDs covered

Change-Id: Ia964822d5a12db0da9c8b425e0ccb72d1bd550a8

7 years agoscripts: Add parameter_validation.h to doc validator
Mark Lobodzinski [Wed, 21 Jun 2017 20:44:14 +0000 (14:44 -0600)]
scripts: Add parameter_validation.h to doc validator

As the python script doesn't know where the generated source ends up,
added a search of the build, dbuild, and release layers dirs. This
generated file contains LOTS of VUIDs.

Change-Id: I767ae2c3af11a0686ee629edb9964b294b5f7e08

7 years agoscripts: Remove noisy print from vuid_mapping.py
Mark Lobodzinski [Wed, 21 Jun 2017 18:21:34 +0000 (12:21 -0600)]
scripts: Remove noisy print from vuid_mapping.py

This script is now used in all builds and was bogging things down.

Change-Id: Ifd8c7d4c5328ce093e1dd9a111536936e1320ca0

7 years agoscripts: Remove unnecessary library from vuid script
Mark Lobodzinski [Fri, 23 Jun 2017 14:38:50 +0000 (08:38 -0600)]
scripts: Remove unnecessary library from vuid script

BeautifulSoup4 caused build farm issues. Seems that this lib is
not necessary.

Change-Id: I2463fbc1bc8f8f7ceec86bfbc823f21b5bb64c37

7 years agoscripts: Update vuid_mapping.py with new APIs
Mark Lobodzinski [Wed, 21 Jun 2017 17:54:54 +0000 (11:54 -0600)]
scripts: Update vuid_mapping.py with new APIs

Change-Id: I67ae851149973455f5a2f7c156f5f2d87f0dd51e

7 years agoloader: Fix handling of JSON
Mark Young [Mon, 26 Jun 2017 20:03:08 +0000 (14:03 -0600)]
loader: Fix handling of JSON

If a JSON layer manifest file says it contained device extensions
but didn't provide a list, or the list was malformed, it caused
issues.

Change-Id: I94b97b190aca35f9464918eb7195486566becaa0

7 years agoscripts: Move layer scripts into scripts directory
Mark Lobodzinski [Wed, 21 Jun 2017 19:41:00 +0000 (13:41 -0600)]
scripts: Move layer scripts into scripts directory

Simplifies sharing code among python modules, keeps everything together.

- Moved python scripts out of layers dir into scripts dir
- Updated relative paths for input/output files in layers dir
- Updated doc validation tests to use correct paths

Change-Id: I57e6ad6f551d4fb652583315fe3dccb23b187db1

7 years agobuild: Exit with return code in update_external bat
Tony Barbour [Wed, 21 Jun 2017 16:22:05 +0000 (10:22 -0600)]
build: Exit with return code in update_external bat

Change-Id: Idf9d85d36c66a63de0c07322a367b45cfe84e3de

7 years agobuild: Fix assembler warning on Win64
Lenny Komow [Thu, 22 Jun 2017 17:45:47 +0000 (11:45 -0600)]
build: Fix assembler warning on Win64

Change-Id: I234f65c3422628c7a66c53e01044045126c4a7b2

7 years agoloader: Modify VK_EXT_debug_marker scripts
Mark Young [Tue, 20 Jun 2017 16:59:42 +0000 (10:59 -0600)]
loader: Modify VK_EXT_debug_marker scripts

There's a discussion of whether or not to make the pointers in
VK_EXT_debug_marker const.  If that happens, the current loader
would break.  Fix the loader so that it would work with
constant pointers.

Change-Id: I105c22d9e6228a8ab68b1bca69514ec227f988ea

7 years agolayers: Do the bulk of pipeline validation unlocked
Chris Forbes [Wed, 21 Jun 2017 20:28:53 +0000 (13:28 -0700)]
layers: Do the bulk of pipeline validation unlocked

7 years agolayers: Rename verifyPipelineCreateState to match new role
Chris Forbes [Wed, 21 Jun 2017 20:23:37 +0000 (13:23 -0700)]
layers: Rename verifyPipelineCreateState to match new role

7 years agolayers: Inline pre-validate into CreateGraphicsPipelines
Chris Forbes [Wed, 21 Jun 2017 20:21:13 +0000 (13:21 -0700)]
layers: Inline pre-validate into CreateGraphicsPipelines

All this did was loop over the pipelines and call a function.

7 years agolayers: Move vertex format validation down a level
Chris Forbes [Wed, 21 Jun 2017 20:18:26 +0000 (13:18 -0700)]
layers: Move vertex format validation down a level

7 years agolayers: Remove pointless instance lookup in pipeline creation
Chris Forbes [Wed, 21 Jun 2017 20:09:52 +0000 (13:09 -0700)]
layers: Remove pointless instance lookup in pipeline creation

7 years agolayers: pass pipe_state vector by const ref
Chris Forbes [Wed, 21 Jun 2017 20:08:55 +0000 (13:08 -0700)]
layers: pass pipe_state vector by const ref

7 years agolayers: Unlock CreateGraphicsPipelines a bit earlier
Chris Forbes [Wed, 21 Jun 2017 20:06:44 +0000 (13:06 -0700)]
layers: Unlock CreateGraphicsPipelines a bit earlier

7 years agolayers: test against maxVertexInputBindingStride should be >, not >=
Cort Stratton [Wed, 21 Jun 2017 22:09:50 +0000 (15:09 -0700)]
layers: test against maxVertexInputBindingStride should be >, not >=

7 years agobuild: Update Travis-CI config
Cody Northrop [Wed, 21 Jun 2017 18:36:23 +0000 (12:36 -0600)]
build: Update Travis-CI config

Container updates for 2017Q2:

https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch

7 years agolayers: Don't accidentally copy pipeline layout again in SC
Chris Forbes [Wed, 21 Jun 2017 18:34:16 +0000 (11:34 -0700)]
layers: Don't accidentally copy pipeline layout again in SC

7 years agolayers:Make DSLayout const in shared_ptrs
Tobin Ehlis [Wed, 21 Jun 2017 16:16:10 +0000 (10:16 -0600)]
layers:Make DSLayout const in shared_ptrs

Declare DescriptorSetLayout's const for shared_ptrs in Pipeline layout
and DSAllocate structs.

7 years agolayers:IsCompatible uses raw DSLayout ptr
Tobin Ehlis [Wed, 21 Jun 2017 16:08:52 +0000 (10:08 -0600)]
layers:IsCompatible uses raw DSLayout ptr

Update IsCompatible calls for DescriptorSetLayout class to use raw ptrs
instead of shared_ptr as the calls just temporarily use the ptr and
don't affect ptr ownership.

7 years agolayers:Set DescriptorSetLayout in DS to const
Tobin Ehlis [Wed, 21 Jun 2017 15:56:13 +0000 (09:56 -0600)]
layers:Set DescriptorSetLayout in DS to const

The DescriptorSetLayout pointed to by shared_ptr in DescriptorSet is
const so add const across uses as appropriate.

7 years agolayers:Pass shared_ptr by const ref
Tobin Ehlis [Wed, 21 Jun 2017 15:26:04 +0000 (09:26 -0600)]
layers:Pass shared_ptr by const ref

DescriptorSetLayout shared_ptr will always survive the lifetime of the
DescriptorSet constructor so pass by const ref.

7 years agolayers:Use make_shared for share_ptr creation
Tobin Ehlis [Wed, 21 Jun 2017 14:17:00 +0000 (08:17 -0600)]
layers:Use make_shared for share_ptr creation

std::make_shared is more efficient for shared_ptr creation, using a
single heap allocation for both the object and control logic, vs. two
separate allocations of using "new" w/ shared_ptr constructor.

7 years agolayers:Migrate DSLayout to shared_ptr
Tobin Ehlis [Tue, 20 Jun 2017 14:30:39 +0000 (08:30 -0600)]
layers:Migrate DSLayout to shared_ptr

Update Descriptor Set Layout copy in Descriptor Set, as well as various
ptr references to use shared_ptr.
This fixes some potential memory leaks and makes Descriptor Set class
lighter weight.

7 years agolayers:Used shared_ptr for DSLayout
Tobin Ehlis [Mon, 19 Jun 2017 22:38:57 +0000 (16:38 -0600)]
layers:Used shared_ptr for DSLayout

Modify DescriptorSetLayout map to use shared_ptr. Will follow-on with
changes to Descriptor Set class that share the ptrs.