platform/upstream/Vulkan-LoaderAndValidationLayers.git
7 years agoloader: Call ICD for CreateDisplayPlaneSurfaceKHR
Mark Young [Wed, 2 Nov 2016 01:20:41 +0000 (19:20 -0600)]
loader: Call ICD for CreateDisplayPlaneSurfaceKHR

Add vkCreateDisplayPlaneSurfaceKHR to the functions that can call
down to an ICD and let it create the KHR_surface object.

Change-Id: I32dd88868c25149a903304f23bdf3a720cdd99af

7 years agoscripts: Build single dispatch table helper
Mark Lobodzinski [Mon, 31 Oct 2016 16:23:17 +0000 (10:23 -0600)]
scripts: Build single dispatch table helper

Modified layers and tests/layers to use 'AllPlatforms' param
instead of displayserver.

Change-Id: I39d53e3991aab4f01854b227e1f6eb030850473d

7 years agoscripts: Add ifdef protection to non_wsi ext APIs
Mark Lobodzinski [Mon, 31 Oct 2016 22:53:40 +0000 (16:53 -0600)]
scripts: Add ifdef protection to non_wsi ext APIs

Dispatch_table_helper.h should not be platform dependent, wrap all
platform dependencies in pre-processor directives for safe
compilation.

Change-Id: I6c876efaceb4d3c38c719f1db9e93d7bd543370e

7 years agoscripts: Re-added AllPlatforms wsi option
Johannes van Waveren [Sun, 30 Oct 2016 04:47:59 +0000 (05:47 +0100)]
scripts: Re-added AllPlatforms wsi option

A single cross-platform dispatch table helper file is preferable.
Added the AllPlatforms parameter back into vk-generate.py

Change-Id: Icc00c04504d58007270eb55fc269651c215aa9b4

7 years agodocs: Updates for Linux loader /usr/local search paths.
Karl Schultz [Mon, 31 Oct 2016 21:58:21 +0000 (15:58 -0600)]
docs: Updates for Linux loader /usr/local search paths.

Change-Id: I899c55815ef51efd141c22a5ce37b0800c2a8430

7 years agotests: Adjust test error message we're looking for
Chris Forbes [Mon, 31 Oct 2016 21:18:12 +0000 (10:18 +1300)]
tests: Adjust test error message we're looking for

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Tweak CmdClearAttachment handling for error DB
Chris Forbes [Wed, 26 Oct 2016 20:32:34 +0000 (09:32 +1300)]
layers: Tweak CmdClearAttachment handling for error DB

- Align the 'ignored' cases with the 1.0.32 spec
- Use unique error enums in the error cases.
- 01125 isn't a perfect match for what I was trying to fix with
  this change, but the code does cover the VU statement.
  Possibly an area we can adjust in the spec.

V2: - Set test names properly too.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Validate VkClearAttachment::aspectMask against aspects present
Chris Forbes [Tue, 25 Oct 2016 23:40:31 +0000 (12:40 +1300)]
layers: Validate VkClearAttachment::aspectMask against aspects present

Fixes #1085

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Rework some names a bit in CmdClearAttachments
Chris Forbes [Tue, 25 Oct 2016 03:32:54 +0000 (16:32 +1300)]
layers: Rework some names a bit in CmdClearAttachments

I want to use some of these names for other things...

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agodemos: Fix uninitialized variables in vulkaninfo
Tony Barbour [Fri, 28 Oct 2016 19:52:29 +0000 (13:52 -0600)]
demos: Fix uninitialized variables in vulkaninfo

Getting validation errors from uninitialized flags fields

Change-Id: I052cafcd3dc2cfd031b9d0ec75e654e318e1f320

7 years agoscripts:Add newline at end of database file
Tobin Ehlis [Mon, 31 Oct 2016 17:10:38 +0000 (11:10 -0600)]
scripts:Add newline at end of database file

This intends to always keep the newline there for consistency.

7 years agoscripts:Update unique error enums as of 10/31/16
Tobin Ehlis [Mon, 31 Oct 2016 13:55:19 +0000 (07:55 -0600)]
scripts:Update unique error enums as of 10/31/16

No new checks this week, updated script to handle blank lines and also
to not output the API name debug info by default.

Cmd line was "python spec.py -update"

7 years agoexternal: Update external commit IDs
Mark Young [Mon, 31 Oct 2016 15:49:06 +0000 (09:49 -0600)]
external: Update external commit IDs

Use latest version of Spir-V tools, Spir-V headers, and Glslang.

Change-Id: Id4675f369e016c507b09a355663b487d29b980c5

7 years agodocs: LX617: Fix Android layer path info
Karl Schultz [Mon, 31 Oct 2016 14:52:38 +0000 (08:52 -0600)]
docs: LX617: Fix Android layer path info

7 years agolayers: update error database
Jeremy Hayes [Fri, 28 Oct 2016 21:17:03 +0000 (15:17 -0600)]
layers: update error database

Change-Id: Ib7cbe624aabedec172bead14d0f6d8314f7fc743

7 years agodemos: Make present mode a command line option
Tony Barbour [Fri, 21 Oct 2016 20:47:07 +0000 (14:47 -0600)]
demos: Make present mode a command line option

rather than a compile time decision

Change-Id: Ia13400f03d1881ca3d923f47f76b068a19670435

7 years agodemos: Move staging texture to demo struct
Tony Barbour [Wed, 19 Oct 2016 20:15:49 +0000 (14:15 -0600)]
demos: Move staging texture to demo struct

Get rid of flush in staging code where it's probably unexpected, considering
it doesn't begin another command buffer, and then wait until the expected
flush to free staging texture resources

Change-Id: I80945c3f002a7efe212608895b91ccf0934fe6f9

7 years agodemos: Move command buffer creation out of layout util
Tony Barbour [Wed, 19 Oct 2016 19:41:16 +0000 (13:41 -0600)]
demos: Move command buffer creation out of layout util

Create, begin, end, and submit the setup command buffer all from the same routine
Change-Id: I1ea93e14e930dc3330f722fe212cd8f66555f618

7 years agoheader: Update header files to version 1.0.32
Mark Lobodzinski [Fri, 28 Oct 2016 14:50:56 +0000 (08:50 -0600)]
header: Update header files to version 1.0.32

 - updated vulkan.h
 - updated vk.xml (note that the validity tags have been removed in
   this update)
 - updated vulkan.hpp
 - updated loader's SOVERSION
 - updated json files to version 1.0.32

Change-Id: Ie650c1d6e0bdff3c8cc9c38d74715c454dec37de

7 years agotests: PV cmdSetViewport code style updates
Mark Lobodzinski [Fri, 28 Oct 2016 18:59:47 +0000 (12:59 -0600)]
tests: PV cmdSetViewport code style updates

Was mucking around in here anyway, so fixed up a few var names.

Change-Id: I15f6eab8a94ed73ad3d2f0db143f099732ff54f7

7 years agotests: Fix header 1.0.32 PV issues
Mark Lobodzinski [Fri, 28 Oct 2016 18:57:23 +0000 (12:57 -0600)]
tests: Fix header 1.0.32 PV issues

The validity checks have been removed from vk.xml. PV needed a small
fixup to replace a check that was formerly autogen'd.

Change-Id: Ic4249ff17c22899b6e5324131c644d054ac2a0cf

7 years agotests:Add RenderPassInUseDestroyedSignaled
Tobin Ehlis [Thu, 27 Oct 2016 13:53:36 +0000 (07:53 -0600)]
tests:Add RenderPassInUseDestroyedSignaled

Added RenderPassInUseDestroyedSignaled test to verify
VALIDATION_ERROR_00393, renderPass in-use when destroyed.

This test exercises case when renderPass is bound to cmd buffer as
a child of a bound pipeline.

Updated database file.

7 years agolayers:Add binding for renderpass in pipeline
Tobin Ehlis [Wed, 26 Oct 2016 20:30:06 +0000 (14:30 -0600)]
layers:Add binding for renderpass in pipeline

When creating the cmd buffer<->object linkage, need to account for any
renderPass that is tied to the pipeline and bind it as well.

7 years agoscripts: Make vk-generate more generic
Mark Lobodzinski [Thu, 27 Oct 2016 14:33:09 +0000 (08:33 -0600)]
scripts: Make vk-generate more generic

Removing 'AllPlatforms' arg simplifies and further isolates this
script from API changes.

Change-Id: Iaa3e7c63984e177471fe207b342d79bffa0614b7

7 years agolayers: Make dispatch_table_helper platform specific
Mark Lobodzinski [Thu, 27 Oct 2016 14:32:01 +0000 (08:32 -0600)]
layers: Make dispatch_table_helper platform specific

Allplatforms was specified unnecessarily, resulting in more work
downstream to filter out undefined entrypoints.

Change-Id: Iba542dd4cf4b51592833e704f3d166be5e73b046

7 years agoscripts: Add simplified extension groups to vulkan.py
Mark Lobodzinski [Thu, 27 Oct 2016 15:52:30 +0000 (09:52 -0600)]
scripts: Add simplified extension groups to vulkan.py

Change-Id: I349e8513e8de69580e3a2bed6b69205c377079cb

7 years agoscripts: Update vulkan.py extension lists
Mark Lobodzinski [Thu, 27 Oct 2016 15:48:53 +0000 (09:48 -0600)]
scripts: Update vulkan.py extension lists

Reduced the number of lists, standardized the accepted parameters
for using vulkan.py, and fixed up naming in preparation for
codegening vulkan.py.

Change-Id: I4dd4fff15733fc73bf0712b306fc651333568ece

7 years agobuild: Update cmake files to use variables as destinations for make install
John Zupin [Thu, 27 Oct 2016 19:15:27 +0000 (13:15 -0600)]
build: Update cmake files to use variables as destinations for make install

Change-Id: Ic1d6ebdb73e796cbb1207963973e410c9928c04f

7 years agoloader: fix duplicate detection of manifests when CMAKE_INSTALL_PREFIX is defined
Dor Askayo [Sat, 22 Oct 2016 19:20:29 +0000 (22:20 +0300)]
loader: fix duplicate detection of manifests when CMAKE_INSTALL_PREFIX is defined

This commit fixes GH-1084. (see the issue for more details)

Note that this adds /usr/local/etc and /usr/local/share to the
loader's search path for drivers and layers.

Change-Id: I2cf502cc7d905225c8d38383ea6f856a4daed3ea
Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
7 years agoloader: use CMAKE_INSTALL_FULL_<dir> to improve Linux filesystem compatibility
Dor Askayo [Sat, 22 Oct 2016 17:42:44 +0000 (20:42 +0300)]
loader: use CMAKE_INSTALL_FULL_<dir> to improve Linux filesystem compatibility

In order to improve the loader's compatibility with different filesystem hierarchies
under Linux, use CMake's CMAKE_INSTALL_FULL_<dir> instead of CMAKE_INSTALL_<dir> to
correctly resolve the absolute paths of SYSCONFDIR and DATADIR in compliance with
the GNU Coding Standard [1] and Linux Foundation's Filesystem Hierarchy Standard [2],
as explained in CMake's documentation [3].

Note to packagers: When using CMAKE_INSTALL_PREFIX, this commit obviates the
definition of other CMAKE_INSTALL_ defines to properly detect ICD and layer
manifests in GNU/Linux-compliant filesystems.

This commit fixes GH-1083. (see the issue for more details)

[1] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
[2] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
[3] https://cmake.org/cmake/help/v3.4/module/GNUInstallDirs.html

Change-Id: If743a3c8f5f7381e00c0d23b95b9e13c0dead144
Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
7 years agoloader: gh1093 - Fix multiple EnumPhysDev calls
Mark Young [Thu, 27 Oct 2016 21:32:08 +0000 (15:32 -0600)]
loader: gh1093 - Fix multiple EnumPhysDev calls

The loader was freeing a previously allocated struct of physical
devices every vkEnumeratePhysicalDevice call.  This caused
pointers to become stale.  This change doesn't fix every scenario,
but it does return the loader to the behavior it had before.
Future work will re-evaluate the list every time and add/remove
items as necessary.

Change-Id: I32b27df1fab521826e6cd15c534d3ab4b2ea0688

7 years agodemos: Add src and dst stages to set_image_layout
Jeremy Hayes [Tue, 25 Oct 2016 23:32:23 +0000 (17:32 -0600)]
demos: Add src and dst stages to set_image_layout

Change-Id: I97ba1643e17bb97faa868123f5ef6e6f140a9b13

7 years agodemos: Fix access masks when cube uses staging bfr
Jeremy Hayes [Tue, 25 Oct 2016 23:02:33 +0000 (17:02 -0600)]
demos: Fix access masks when cube uses staging bfr

Change-Id: I78f9c5ecb36edbd2515f7ef2a889519e45707ea8

7 years agodemos: Cube barrier changes from GH #1033
Jeremy Hayes [Tue, 25 Oct 2016 22:12:09 +0000 (16:12 -0600)]
demos: Cube barrier changes from GH #1033

Change-Id: Ib6638235ccf006e962ea3bacac82fdc1a75e08e4

7 years agocube.cpp: Remove excess tests from present fences
Jeremy Hayes [Tue, 25 Oct 2016 21:57:02 +0000 (15:57 -0600)]
cube.cpp: Remove excess tests from present fences

Instead of using a bool array and both checking and writing to it every
frame for no reason, just create the presentation fences with the
VK_FENCE_CREATE_SIGNALED_BIT flag.

Change-Id: Icfa630a821bade51439ecbc6edddd4973d7bd4ed

7 years agolayers: Fix a couple of err enum probs found by accident
Karl Schultz [Thu, 27 Oct 2016 19:29:19 +0000 (13:29 -0600)]
layers: Fix a couple of err enum probs found by accident

Change-Id: Ibdebf762561e5e0888c3c04e5047d9d879d5f45a

7 years agolayers:Share image aspect validation code
Tobin Ehlis [Wed, 26 Oct 2016 20:13:46 +0000 (14:13 -0600)]
layers:Share image aspect validation code

Mult-purpose the image aspect mask validation code to run both at
CreateImageView time and at ValidateBarriers time. There was some basic
image aspect mask validation at ValidateBarriers, but this makes it
more complete and will catch some escapes.

Update the tests related to these checks to account changes in error
messages and also trying to remove some unexpected errors.

7 years agolayers:Migrate CreateImageView checks
Tobin Ehlis [Wed, 26 Oct 2016 16:42:49 +0000 (10:42 -0600)]
layers:Migrate CreateImageView checks

Move CreateImageView checks from image layer to core_validation.
This is in preparation of dual-purposing the aspect mask checking
code to perform the same check on barriers.

Also updated these checks to use unique errors enums and made
corresponsing changes to the database file.

7 years agolayers:Rename skip_call in CreateImageView
Tobin Ehlis [Wed, 26 Oct 2016 14:04:58 +0000 (08:04 -0600)]
layers:Rename skip_call in CreateImageView

Rename skip_call->skip in CreateImageView()

7 years agolayers: Don't put self-dep edges in the subpass DAG, or any other junk
Chris Forbes [Wed, 26 Oct 2016 02:45:33 +0000 (15:45 +1300)]
layers: Don't put self-dep edges in the subpass DAG, or any other junk

We'd already excluded edges to/from VK_SUBPASS_EXTERNAL, but we don't
want any of the other weird cases either; if we attempted to trace use
of an attachment, and found a subpass which /didn't/ use it, but had a
self-dependency, we'd get stuck chasing that dependency recursively
until we exhausted the stack.

Fixes #1094

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agoscripts: Fix codegen issue in dispatch-table-helper
Mark Lobodzinski [Wed, 26 Oct 2016 14:19:24 +0000 (08:19 -0600)]
scripts: Fix codegen issue in dispatch-table-helper

If a dispatch table entry needed to be protected by a #ifdef and was
the last prototype in the list, the corresponding #endif was not
generated causing compilation failures.

Change-Id: I8760bf546bc38d6fc7d80cd3a095e52977dc554e

7 years agoscripts: Fixup vulkan.py for trunkmerges in VT
Mark Lobodzinski [Wed, 26 Oct 2016 15:29:08 +0000 (09:29 -0600)]
scripts: Fixup vulkan.py for trunkmerges in VT

VulkanTools still uses some of the removed vulkan.py functionality.
Adding back in to facilitate trunk merges.

Change-Id: I92b4793f551e5d2afa46f353984a97ee87d831f4

7 years agolayers:Refactor PostCallRecordFreeMemory()
Tobin Ehlis [Wed, 26 Oct 2016 04:00:47 +0000 (22:00 -0600)]
layers:Refactor PostCallRecordFreeMemory()

Simplify the code based on review feedback. Don't need loop guard and
don't need to clear the set of struct that's about to be freed.

7 years agolayers:Fix destroy functions w/ disable flags
Tobin Ehlis [Wed, 26 Oct 2016 03:47:46 +0000 (21:47 -0600)]
layers:Fix destroy functions w/ disable flags

All of the Destroy functions Pre* calls had a bug where, if the disable
flag was on, the state ptr and object struct were not correctly set.

Updated all of these cases to first update state ptr and obj_struct and
only then check the disable flag.

7 years agolayers:Rename EVENT_NODE->EVENT_STATE
Tobin Ehlis [Thu, 20 Oct 2016 20:17:21 +0000 (14:17 -0600)]
layers:Rename EVENT_NODE->EVENT_STATE

7 years agolayers:Refactor DestroyEvent
Tobin Ehlis [Thu, 20 Oct 2016 20:13:24 +0000 (14:13 -0600)]
layers:Refactor DestroyEvent

Update DestroyEvent to use the Pre/Post call pattern and add a
validation flag.

7 years agolayers:Refactor FreeMemory()
Tobin Ehlis [Thu, 20 Oct 2016 17:02:03 +0000 (11:02 -0600)]
layers:Refactor FreeMemory()

Updated FreeMemory to follow the Pre/Post call pattern. There was some
old code that I was able to just throw away such as clearing memory
struct members before the struct was freed, a few separate info
messages that aren't very useful, and some broken code that would clear
every mem reference on a cmd buffer when only a single mem object would
be freed.

Also added validation flag, unique error enum, and updated database
file.

7 years agolayers:Early exit in object_tracker FreeMemory
Tobin Ehlis [Thu, 20 Oct 2016 20:42:57 +0000 (14:42 -0600)]
layers:Early exit in object_tracker FreeMemory

If memory object is invalid, object_tracker should not call down the
chain. Also, update validation test to expect that object_tracker
will flag the invalid handle instead of core_validation.

7 years agolayers:Variable renaming
Tobin Ehlis [Thu, 20 Oct 2016 16:14:38 +0000 (10:14 -0600)]
layers:Variable renaming

Rename some vars from camelCase to lowercase to meet style guide.
There was one line where we re-did a calculation that I updated to use
the already calculated value.

7 years agolayers:Remove duplicate cmd buffer binding
Tobin Ehlis [Thu, 20 Oct 2016 16:09:44 +0000 (10:09 -0600)]
layers:Remove duplicate cmd buffer binding

Memory objects inherit cb_bindings from BASE_NODE so don't need
redundant command_buffer_bindings. Remove that and update the code to
use the standard cb_bindings.
Also renamed a few vars from camelCase while touching code.

7 years agolayers:Refactor DestroyCommandPool
Tobin Ehlis [Thu, 20 Oct 2016 15:40:35 +0000 (09:40 -0600)]
layers:Refactor DestroyCommandPool

Update DestroyCommandPool to use the Pre/Post pattern and add a
validation flag for these checks.

7 years agolayers:Update enums for cmdbuffer in-use cases
Tobin Ehlis [Thu, 20 Oct 2016 13:43:15 +0000 (07:43 -0600)]
layers:Update enums for cmdbuffer in-use cases

Add 4 unique enums for cmd buffer & pool free and reset cases.
Update the database file as well.

7 years agolayers:Rename SAMPLER_NODE->SAMPLER_STATE
Tobin Ehlis [Thu, 20 Oct 2016 12:50:37 +0000 (06:50 -0600)]
layers:Rename SAMPLER_NODE->SAMPLER_STATE

7 years agolayers:Refactor DestroySampler
Tobin Ehlis [Thu, 20 Oct 2016 12:35:39 +0000 (06:35 -0600)]
layers:Refactor DestroySampler

Update DestroySampler to use the Pre/Post pattern and add a validation
flag for these checks.

7 years agolayers:CreateDescriptorSetLayout cleanup
Tobin Ehlis [Wed, 26 Oct 2016 02:56:47 +0000 (20:56 -0600)]
layers:CreateDescriptorSetLayout cleanup

Streamline duplicate binding check, use [] operator instead of emplace,
remove dead comment and add new comment.

7 years agotests:Add DuplicateDescriptorBinding test
Tobin Ehlis [Tue, 25 Oct 2016 13:58:24 +0000 (07:58 -0600)]
tests:Add DuplicateDescriptorBinding test

Test case where descriptor set layout had two bindings with the same
value.

7 years agolayers:Refactor CreateDescriptorSetLayout
Tobin Ehlis [Tue, 25 Oct 2016 15:36:53 +0000 (09:36 -0600)]
layers:Refactor CreateDescriptorSetLayout

Update CreateDescriptorSetLayout() to use Pre/Post pattern and split
out validation of createInfo for the layout to occur before the
creation of the layout.

7 years agolayers:Update error enum for duplicate bindings
Tobin Ehlis [Tue, 25 Oct 2016 13:43:27 +0000 (07:43 -0600)]
layers:Update error enum for duplicate bindings

Add unique error enum for the case where descriptor bindings are
duplicated.

7 years agolayers:Rename cmd buffer flags for clarity
Tobin Ehlis [Tue, 25 Oct 2016 21:23:08 +0000 (15:23 -0600)]
layers:Rename cmd buffer flags for clarity

Fixes #870

CBSTATUS_ALL was not clear so changed to more descriptive
CBSTATUS_ALL_STATE_SET. This mask is used to flag all of the pipeline
state for a cmd buffer as "set." The setting can then be adjusted based
on which state was flagged as dynamic in the pipeline state object.

7 years agoscripts:Update spec.py for 6-column database
Tobin Ehlis [Tue, 25 Oct 2016 20:00:20 +0000 (14:00 -0600)]
scripts:Update spec.py for 6-column database

Bring spec.py up-to-date so that it properly reads in the API and
note columns from the database file, and retains any note text when
updating.

7 years agoscripts:Update database file w/ api column
Tobin Ehlis [Wed, 19 Oct 2016 21:59:38 +0000 (15:59 -0600)]
scripts:Update database file w/ api column

This adds two columns to the error database file.
The first is the Vulkan api call that the error is related to.
The second is a free txt field for "notes" as the last column.

The spec.py script in this commit is a slightly hacky version that
was used to generate the updated database file. In follow-on commit
I'll update the spec.py file to correctly handle the updated database
file format.

7 years agoscripts:Skip repeat error strings
Tobin Ehlis [Wed, 19 Oct 2016 21:32:35 +0000 (15:32 -0600)]
scripts:Skip repeat error strings

When generating unique error enums, detect and flag identical error
strings and then skip them. The error strings should be unique so this
recognizes cases when they aren't and recommends spec review and filing
a spec bug as appropriate.

7 years agodocs: Fix .md syntax typo in header
Rene Lindsay [Tue, 25 Oct 2016 17:05:09 +0000 (11:05 -0600)]
docs: Fix .md syntax typo in header

7 years agoscripts:Update unique error enums as of 10/25/16
Tobin Ehlis [Tue, 25 Oct 2016 12:33:27 +0000 (06:33 -0600)]
scripts:Update unique error enums as of 10/25/16

Two new checks, two killed checks, and one updated check this week.

Cmd line used for update:
python spec.py -update -remap 2270-2042

7 years agoloader: Fix cast warning
Jamie Madill [Mon, 24 Oct 2016 20:54:40 +0000 (16:54 -0400)]
loader: Fix cast warning

Fix a cast warning found in loader.c.

Change-Id: Ie39e84ce8f050a2655c2ad3a1a146dda17c15bf9

7 years agoloader: gh610- More debug log messages
Mark Young [Fri, 21 Oct 2016 22:25:47 +0000 (16:25 -0600)]
loader: gh610- More debug log messages

Add more debug log messages for CreateDevice.

Change-Id: Iba02facc479fab6a6f976addc94da3accf9541f4

7 years agoexternals: Update glslang revision
Mark Young [Fri, 21 Oct 2016 17:04:52 +0000 (11:04 -0600)]
externals: Update glslang revision

Updated glslang to use commit
3fc1543794d1c368d690e60eaac6111c8c436aa7 from 10/20/2016.

Change-Id: I016273fbe936abd2dd5c19f5ee9ce3e6d09d72e6

7 years agoAdding input attachment access as optional for attachment optimal layouts.
Jan-Harald Fredriksen [Fri, 21 Oct 2016 13:14:16 +0000 (15:14 +0200)]
Adding input attachment access as optional for attachment optimal layouts.

Change-Id: I0ef3d1af2ef38d218f1721e98eb1d98b326cd340

7 years agodemos: Add src and dst stages to set_image_layout
Tony Barbour [Wed, 19 Oct 2016 19:58:29 +0000 (13:58 -0600)]
demos: Add src and dst stages to set_image_layout

Change-Id: I70e70b8085cc1196b5ffb69283c158ea8bd7ec1b

7 years agotests: Add postive test group to validatelayerdoc script
Karl Schultz [Thu, 20 Oct 2016 20:46:44 +0000 (14:46 -0600)]
tests: Add postive test group to validatelayerdoc script

Change-Id: If8b1d81d4c755ba8fc409d141387291d0e7d813d

7 years agolayers: More err enum work in obj_tracker
Karl Schultz [Tue, 18 Oct 2016 00:27:20 +0000 (18:27 -0600)]
layers: More err enum work in obj_tracker

Change-Id: I299b68ec2e66d77812ce5dff0d457e328cdd6c5c

7 years agotests: Segregate positive LVT tests
Mark Lobodzinski [Wed, 19 Oct 2016 16:27:54 +0000 (10:27 -0600)]
tests: Segregate positive LVT tests

Created new test class (VkPositiveLayerTest) for positive tests,
moved existing positive test into this class and split tests having
a mix of positive and negative tests. This should make things a bit
cleaner when adding valid usage IDs and adding test names into the
VU database.  In the future the class can be extended to do error
checking automatically.

Change-Id: I33af3d80f154b55bb55ad0c0e515a773b144c701

7 years agodemos: Fix access masks when cube uses staging buffer
Tony Barbour [Wed, 19 Oct 2016 21:23:36 +0000 (15:23 -0600)]
demos: Fix access masks when cube uses staging buffer

Change-Id: I89655f8224c3543d9c57f2cf7bd55b2c2a21c09f

7 years agotests: Expand abbreviations for readability
Mike Weiblen [Wed, 19 Oct 2016 18:28:27 +0000 (12:28 -0600)]
tests: Expand abbreviations for readability

Continuation of commit d793351
Expand abbreviations to improve readability:

PSO -> pipeline state object
w/o -> without

Change-Id: Ia0281b4d2dc00541a70bc48710daa0ffd89d9117

7 years agoscripts:Fix valid usage parsing
Tobin Ehlis [Tue, 18 Oct 2016 21:55:07 +0000 (15:55 -0600)]
scripts:Fix valid usage parsing

Fixes #1067

Original valid usage parsing was naive and in how it used "strong" tags
to disable valid usage parsing which led to missing some checks and
including some spec language that wasn't valid usage.

This change isolates valid usage parsing to sidebar blocks which will
always contain the valid usage language. This prevents anything outside
of a sidebar from being incorrectly caught as valid usage and it also
catched a number of valid usage cases that were missed with previous
parser.

There are about 50 valid usage cases removed and about 300 added.

7 years agolayers: Reword from cryptic abbreviations to readable words
Mike Weiblen [Tue, 18 Oct 2016 01:33:05 +0000 (19:33 -0600)]
layers: Reword from cryptic abbreviations to readable words

Expand abbreviations to improve readability:
DS=depth/stencil
DS=descriptor set
CB=command buffer
VS=vertex shader
FS=fragment shader
VTX=vertex
PSO=pipeline state object

Change-Id: I48fe917aac50d1911fe2a3aa1ed2c739637c7645

7 years agolayers: Fix core_validation function declarations
Mike Stroyan [Wed, 19 Oct 2016 15:27:17 +0000 (09:27 -0600)]
layers: Fix core_validation function declarations

Add VKAPI_ATTR to FlushMappedMemoryRanges and
InvalidateMappedMemoryRanges function declarations.

7 years agotests: Add ValErrorId support to ErrorMonitor
Mark Lobodzinski [Tue, 18 Oct 2016 19:34:58 +0000 (13:34 -0600)]
tests: Add ValErrorId support to ErrorMonitor

SetDesiredMessage is now overloaded to take a string or a unique
error enum ID (VALIDATION_ERROR_xxxxx) to identify a particular
message. Passing in VALIDATION_ERROR_MAX_ENUM will match all
messages for positive tests.  Also updated a couple of tests to use
error enums instead of strings.

Change-Id: Ic7723cf88ea6bda57d89ab82aace6ed358b14382

7 years agotests: Add a test that does spase memory binding
Tony Barbour [Mon, 10 Oct 2016 21:01:12 +0000 (15:01 -0600)]
tests: Add a test that does spase memory binding

Change-Id: I14a29732d710e0c03931423b3ef7abb498c7e261

7 years agodemos: Fix misspelling
Mike Weiblen [Tue, 18 Oct 2016 00:52:05 +0000 (18:52 -0600)]
demos: Fix misspelling

Change-Id: I044619fb70b0a77dcbcdfe7c72dc8915119239a3

7 years agolayers:Fix cmd buffer to buffer binding
Tobin Ehlis [Tue, 18 Oct 2016 12:31:15 +0000 (06:31 -0600)]
layers:Fix cmd buffer to buffer binding

Bind the buffer to the cmd buffer independent of the buffer memory.
Previously in the null memory case we'd bind the cmd buffer to the
buffer without binding the buffer to the cmd buffer. This fixes that
imbalance.

7 years agolayers:Fix memory cleanup at DestroyImage time
Tobin Ehlis [Wed, 12 Oct 2016 00:46:21 +0000 (18:46 -0600)]
layers:Fix memory cleanup at DestroyImage time

Need to ClearMemoryObjectBindings() when an image is destroyed. Do
this even if mem_info is NULL which it will be for sparse bindings.

7 years agolayers:Update memory helper funcs to use BINDABLE
Tobin Ehlis [Tue, 11 Oct 2016 23:29:32 +0000 (17:29 -0600)]
layers:Update memory helper funcs to use BINDABLE

When getting, setting & clearing memory bindings, work with the updated
BINDABLE superclass of IMAGE & BUFFER state objects.

7 years agolayers:Add BINDABLE superclass for image/buffer state
Tobin Ehlis [Tue, 11 Oct 2016 20:26:49 +0000 (14:26 -0600)]
layers:Add BINDABLE superclass for image/buffer state

Support for sparse memory binding is virually non-existant in current
validation layers. This is a first step down a long path to improve
sparse binding support.

The BINDABLE superclass is sub-classed by IMAGE & BUFFER state objs
and contains memory binding info in both the single binding and
sparse binding cases.

Bindings are initially encapsulated in the new MEM_BINDING struct.
For single binding cases, things are almost exactly the same as they
have always been. For sparse binding, the various bindings will be
stored in the sparse_bindings set where we initally don't have complete
information on the sparse binding as we only store the MEM_BINDING info
but this is a start.

7 years agotests: More portable CmdBlitImage format tests
Mike Stroyan [Tue, 18 Oct 2016 17:10:23 +0000 (11:10 -0600)]
tests: More portable CmdBlitImage format tests

Use mandatory VK_FORMAT_R8G8B8A8_SINT instead of BGRA.

7 years agodemos: Cube barrier changes from GH #1033
Tony Barbour [Tue, 11 Oct 2016 17:41:05 +0000 (11:41 -0600)]
demos: Cube barrier changes from GH #1033

Change-Id: Ic68f9cd722474dc74957625c23c0f801f4b3852c

7 years agotests:Add empty descriptor binding positive test
Tobin Ehlis [Mon, 17 Oct 2016 19:54:32 +0000 (13:54 -0600)]
tests:Add empty descriptor binding positive test

This test replicated the broken case from GH1053.
This case was previously broken but was fixed in previous CL.
Create descriptor set with 3 bindings where 2nd one is empty, then
update the final binding.

7 years agolayers:Kill blank array element for empty binding
Tobin Ehlis [Mon, 17 Oct 2016 19:51:57 +0000 (13:51 -0600)]
layers:Kill blank array element for empty binding

Fixes #1053

DescriptorLayout class was incrementing global index for empty bindings
which led to an empty array entry that could cause invalid errors when
updating descriptors.
This change will only increment global index for non-empty bindings.

7 years agotests: Add CmdBlitImage format tests
Mike Stroyan [Mon, 17 Oct 2016 19:58:10 +0000 (13:58 -0600)]
tests: Add CmdBlitImage format tests

Test two cases of mismatch of signed or unsigned int formats
in CmdBlitImage calls.

7 years agoheader: Update vulkan.hpp to version 1.0.31
Mark Lobodzinski [Mon, 17 Oct 2016 22:52:10 +0000 (16:52 -0600)]
header: Update vulkan.hpp to version 1.0.31

Change-Id: Ia81cef98ef59431255e608d3a3faecfc4368ef8d

7 years agoloader: Update SOVERSION to version 1.0.31
Mark Lobodzinski [Mon, 17 Oct 2016 22:50:51 +0000 (16:50 -0600)]
loader: Update SOVERSION to version 1.0.31

Change-Id: If2e6d7dee62d03cfc95bebd8418c53bceef6fc22

7 years agolayers: Update layer json files to version 1.0.31
Mark Lobodzinski [Mon, 17 Oct 2016 22:49:59 +0000 (16:49 -0600)]
layers: Update layer json files to version 1.0.31

Change-Id: I0f88d1c5572b643d83168095d95a3f33c6d5b837

7 years agoheader: Move vulkan.h. to version 1.0.31
Mark Lobodzinski [Mon, 17 Oct 2016 22:48:35 +0000 (16:48 -0600)]
header: Move vulkan.h. to version 1.0.31

Change-Id: I854442c5ef7f42b380766fd24aa11ef48dfb4ffb

7 years agoheader: Move vk.xml to version 1.0.31
Mark Lobodzinski [Mon, 17 Oct 2016 22:48:09 +0000 (16:48 -0600)]
header: Move vk.xml to version 1.0.31

Change-Id: If908ba18545c4afc0d041904c0daa57a2569c5a9

7 years agolayers:Fix Val IDs msg calls for
Tobin Ehlis [Tue, 18 Oct 2016 13:31:22 +0000 (07:31 -0600)]
layers:Fix Val IDs msg calls for

Two CmdCopyImage checks were looking up the incorrect strings for their
error enums. Use the correct strings.

7 years agoscripts:Update spec script to include extensions
Tobin Ehlis [Sat, 15 Oct 2016 00:06:16 +0000 (18:06 -0600)]
scripts:Update spec script to include extensions

Moving all of the validation error enums from the vanilla 1.0 script to
the script that includes all of the extensions.

Took a bit of script wizardry and lots of back and forth to get all of
the new checks matching the old ones. I think everything is there from
the original except for 4 layer checks (enums 1661-1664) that were all
invalid errors.

For reference here's the complete command line used to migrate:
python spec.py -update -remap 628-619:708-671:729-689:732-692:762-722:\
1251-1203:1253-1204:1256-1206:1258-1207:1315-1263:1320-1268:1322-1269:\
1364-1310:1366-1311:1369-1313:1371-1314:1555-1458:1684-1584:1697-1597:\
1960-1679,3:1945-1665,13:1963-1683,11

7 years agolayers: Fix bad use of PIPELINE_STATE ptr value in errors
Chris Forbes [Mon, 17 Oct 2016 02:45:49 +0000 (15:45 +1300)]
layers: Fix bad use of PIPELINE_STATE ptr value in errors

Fixes #1056.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agoloader: Fix vkDestroySurfaceKHR call on NULL surf
Mark Young [Mon, 17 Oct 2016 18:27:36 +0000 (12:27 -0600)]
loader: Fix vkDestroySurfaceKHR call on NULL surf

Thanks to Derrick Owens @ AMD for catching this bug which can
cause a null-ptr dereference while running Khronos conformance
test dEQP-VK.wsi.win32.surface.destroy_null_handle.

Change-Id: I104a890cd23615458566ec71e072e21c76e989cb

7 years agodemos: fix cubepp on wayland errors
Jeremy Hayes [Fri, 14 Oct 2016 21:09:35 +0000 (15:09 -0600)]
demos: fix cubepp on wayland errors

Change-Id: I74fe07d170ee0e403357a018554ac9d6c754b6b5

7 years agoexternal: Update spirv and glslang revisions
Mark Young [Fri, 14 Oct 2016 20:19:25 +0000 (14:19 -0600)]
external: Update spirv and glslang revisions

Updated spirv-tools, spirv-headers, and glslang to latest
commits in their respective repositories.

Change-Id: Ic6543f827de2311a3e88d6e97bedcc0e77d7086a