platform/upstream/Vulkan-Tools.git
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

7 years agoloader: Fix compilation warning in debug_report.c
Mark Young [Fri, 14 Oct 2016 20:18:56 +0000 (14:18 -0600)]
loader: Fix compilation warning in debug_report.c

Change-Id: I92e7f23217ef3897995514360c23849ef1cfadeb

7 years agolayers: Update CmdCopyImage validation for style
Mark Lobodzinski [Fri, 14 Oct 2016 19:09:48 +0000 (13:09 -0600)]
layers: Update CmdCopyImage validation for style

Updated function/var names for layer coding style guidelines.

Change-Id: Ia9bcc2bd1c87e0e5f49d0d5996c030d727d971d2

7 years agolayers: Add Val IDs for a more cmdCopyImage checks
Mark Lobodzinski [Fri, 14 Oct 2016 18:13:33 +0000 (12:13 -0600)]
layers: Add Val IDs for a more cmdCopyImage checks

A couple more of the CmdCopyImage checks that have LVTs got added.
One of the remaining ones is not covered by valid usage but is a
'must' check, will add later.

Change-Id: Id9a1b7ad276c159149be4ef8c29d845baae29a35

7 years agolayers: GH1055, Update unique validation IDs
Mark Lobodzinski [Fri, 14 Oct 2016 17:40:31 +0000 (11:40 -0600)]
layers: GH1055, Update unique validation IDs

For CmdCopyImage bounds checks.

Change-Id: Ifb0f9916df9f0ee50815733c990f3e4397565e7e

7 years agolayers: Updated validation database for new checks
Mark Lobodzinski [Fri, 14 Oct 2016 17:43:44 +0000 (11:43 -0600)]
layers: Updated validation database for new checks

Updated entries for new CmdCopyImage tests.

Change-Id: I3511da9c4e335fbd25eef0b60be5d4f9cc12a4d0

7 years agolayers: Add error message header to image layer
Mark Lobodzinski [Fri, 14 Oct 2016 17:43:06 +0000 (11:43 -0600)]
layers: Add error message header to image layer

Change-Id: I12afb66f2ba6de940f3257e52c5073690acd3d45

7 years agolayers: GH1055, Add bounds checks for CmdCopyImage
Mark Lobodzinski [Fri, 14 Oct 2016 16:59:27 +0000 (10:59 -0600)]
layers: GH1055, Add bounds checks for CmdCopyImage

Added missing bounds-checking code.

Change-Id: Ia65b8bb22e6c580c3ebbb26409ddfbf5dcb683b6

7 years agolayers:Kill old MTMERGE defines
Tobin Ehlis [Wed, 12 Oct 2016 13:25:59 +0000 (07:25 -0600)]
layers:Kill old MTMERGE defines

Just a couple of these lingering that we can now axe

7 years agolayers: Suppress warning generation after app acknowledges an error
Chris Forbes [Thu, 13 Oct 2016 01:44:03 +0000 (14:44 +1300)]
layers: Suppress warning generation after app acknowledges an error

The app already knows about the problem-- it has requested that the call
be skipped. Producing another warning afterward is just noise.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Stop copying INSTANCE_STATE into device
Chris Forbes [Thu, 13 Oct 2016 02:34:59 +0000 (15:34 +1300)]
layers: Stop copying INSTANCE_STATE into device

V2: Squash in second patch; resolve conflicts with @tobine's renames.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers:Pipeline state rename fixup
Tobin Ehlis [Thu, 13 Oct 2016 16:18:18 +0000 (10:18 -0600)]
layers:Pipeline state rename fixup

Overzealous bulk replace changed getPipelineLayout to getPipelineState
layout. This should not have been changed so reverting here.

7 years agolayers:Rename IMAGE_NODE to IMAGE_STATE
Tobin Ehlis [Wed, 12 Oct 2016 23:17:57 +0000 (17:17 -0600)]
layers:Rename IMAGE_NODE to IMAGE_STATE

Another node->state rename pass.

7 years agolayers:Refactor DestroyImage
Tobin Ehlis [Wed, 12 Oct 2016 23:14:02 +0000 (17:14 -0600)]
layers:Refactor DestroyImage

Add validation flag for DestroyImage and update it to follow the
Pre/Post pattern.

7 years agolayers:Refactor DestroyRenderPass
Tobin Ehlis [Wed, 12 Oct 2016 22:58:54 +0000 (16:58 -0600)]
layers:Refactor DestroyRenderPass

Add validation flag for DestroyRenderPass and update it to follow the
Pre/Post pattern.

7 years agolayers:Rename RENDER_PASS_NODE to *_STATE
Tobin Ehlis [Wed, 12 Oct 2016 21:24:03 +0000 (15:24 -0600)]
layers:Rename RENDER_PASS_NODE to *_STATE

Another node->state rename pass.

7 years agolayers:Bind descriptor pool to cmd buffer
Tobin Ehlis [Wed, 12 Oct 2016 21:09:16 +0000 (15:09 -0600)]
layers:Bind descriptor pool to cmd buffer

Add pool state to DescriptorSet instead of just the pool.
Then, at bind time, create a dual binding between the cmd buffer
and the pool. This correcly puts pool in-use when cmd buffer is
submitted, as well as flagging cmd buffer as INVALID if/when the
pool is destroyed.

7 years agolayers:Update some pool_node naming
Tobin Ehlis [Wed, 12 Oct 2016 21:01:39 +0000 (15:01 -0600)]
layers:Update some pool_node naming

Change some pool_node names to pool_state in DescriptorSet class.
Also update getPool function prototype to the new name of
getDescriptorSetState().

7 years agolayers:Add pool member to DescriptorSet class
Tobin Ehlis [Wed, 12 Oct 2016 20:34:12 +0000 (14:34 -0600)]
layers:Add pool member to DescriptorSet class

When creating a DescriptorSet instance, record the pool that the set is
allocated from in a private pool_ variable.
Then, when binding a set to a cmd buffer, also create a binding between
the command buffer and the pool.
This allows us to catch the in-use case when sets are implicitly freed
by calling vkDestroyDescriptorPool().

7 years agolayers:Rename DESCRIPTOR_POOL_NODE to *_STATE
Tobin Ehlis [Wed, 12 Oct 2016 20:27:30 +0000 (14:27 -0600)]
layers:Rename DESCRIPTOR_POOL_NODE to *_STATE

Continuing the NODE->STATE renaming effort

7 years agolayers:Kill outdated comment
Tobin Ehlis [Wed, 12 Oct 2016 20:05:01 +0000 (14:05 -0600)]
layers:Kill outdated comment

7 years agotests:Add FramebufferInUseDestroyedSignaled test
Tobin Ehlis [Wed, 12 Oct 2016 19:20:29 +0000 (13:20 -0600)]
tests:Add FramebufferInUseDestroyedSignaled test

This test creates a binding between framebuffer and cmd buffer, submits
the cmd buffer and then destroys the framebuffer while still in-use to
verify that the correct error is triggered.
Update database file with new test for check 00422.

7 years agolayers:Fix framebuffer cmd buffer binding
Tobin Ehlis [Wed, 12 Oct 2016 19:18:20 +0000 (13:18 -0600)]
layers:Fix framebuffer cmd buffer binding

Wasn't correctly establishing binding between framebuffer object and
cmd buffer object that it's used in. Updated code to use standard
addCommandBufferBinding() function.

7 years agolayers:Rename FRAMEBUFFER_NODE to *_STATE
Tobin Ehlis [Wed, 12 Oct 2016 17:54:09 +0000 (11:54 -0600)]
layers:Rename FRAMEBUFFER_NODE to *_STATE

Part of ongoing effort to kill nebulous "NODE" moniker and switch to
"STATE" instead.

7 years agolayers:Refactor DestroyFramebuffer
Tobin Ehlis [Wed, 12 Oct 2016 17:48:21 +0000 (11:48 -0600)]
layers:Refactor DestroyFramebuffer

Add validation flag for DestroyFramebuffer and update it to follow the
Pre/Post pattern. This function didn't previously perform an in-use
check so added that check.
Updated database file.

7 years agolayers:Add in-use unique error enums
Tobin Ehlis [Wed, 12 Oct 2016 15:58:35 +0000 (09:58 -0600)]
layers:Add in-use unique error enums

Pass error enum into ValidateObjectNotInUse function and update
all of the existing calls to pass correct enum.
Also update database file to record checks as implemented and note
test status.

7 years agolayers:Add validation to DestroyDescriptorPool
Tobin Ehlis [Wed, 12 Oct 2016 15:29:26 +0000 (09:29 -0600)]
layers:Add validation to DestroyDescriptorPool

Add validation flag for DestroyDescriptorPool and update it with
validation code using the Pre/Post pattern.
Flag error if descriptor pool is in use and invalidate any cmd buffers
that it was bound to. Remove pool state from map when it's destroyed.
When the pool is destroyed make sure all of its descriptor sets are
also freed.

7 years agolayers:Rename PIPELINE_NODE to PIPELINE_STATE
Tobin Ehlis [Wed, 12 Oct 2016 15:05:51 +0000 (09:05 -0600)]
layers:Rename PIPELINE_NODE to PIPELINE_STATE

Would like to migrate "NODE" structs to "STATE" as it's more
descriptive of their purpose. This commit changes PIPELINE_NODE
to PIPELINE_STATE.

7 years agolayers:Reduce locking window
Tobin Ehlis [Wed, 12 Oct 2016 14:53:27 +0000 (08:53 -0600)]
layers:Reduce locking window

Don't need to lock around these decls in DestroyImage/BufferView

7 years agolayers:Refactor DestroyPipeline
Tobin Ehlis [Wed, 12 Oct 2016 14:51:35 +0000 (08:51 -0600)]
layers:Refactor DestroyPipeline

Add validation flag for DestroyPipeline and update it to follow the
Pre/Post pattern.

7 years agolayers:Refactor DestroyImageView
Tobin Ehlis [Wed, 12 Oct 2016 14:27:08 +0000 (08:27 -0600)]
layers:Refactor DestroyImageView

Add validation flag for DestroyImageView and update it to follow the
Pre/Post pattern.

Also made a couple minor tweaks to DestroyBufferView based on review.

7 years agoloader: gh1035- vkDestroyDebugReportCallbackEXT
Mark Young [Thu, 13 Oct 2016 16:51:14 +0000 (10:51 -0600)]
loader: gh1035- vkDestroyDebugReportCallbackEXT

The changes I made to enable layer wrapping of the debug report
callback broke the cleanup case so that under certain scenarios
vkDestroyDebugReportCallbackEXT would not delete the callback
resulting in messages after the destroy call.

Change-Id: Ie5b26d8c973a08bb3161412468bb9dfdb70b315c

7 years agolayers: Removed genvk.py
Mark Lobodzinski [Wed, 12 Oct 2016 17:34:19 +0000 (11:34 -0600)]
layers: Removed genvk.py

Replaced with an updated and modified version, lvl_genvk.py.

Change-Id: I60f344d8361d1408303185a5d7958575a404870e

7 years agolayers: Update build for v1.0.30 XML code-gen
Mark Lobodzinski [Thu, 13 Oct 2016 14:58:38 +0000 (08:58 -0600)]
layers: Update build for v1.0.30 XML code-gen

- Updated cmakefiles for new codegen files: renamed genvk.py to
  lvl_genvk.py as the file is modified in this repo.
- Modified dependencies and parameters of cmake build macros.
- Updated reg.py to version 1.0.30
- Updated generator.py to version 1.0.30

Change-Id: Ia87fc7fc68e406a724d5ad9822f1f87b964f9977

7 years agolayers: Add and update custom version of genvk.py
Mark Lobodzinski [Tue, 11 Oct 2016 21:23:51 +0000 (15:23 -0600)]
layers: Add and update custom version of genvk.py

Created a LoaderAndValidationLayers-specific version of the
1.0.30 version of genvk.py, locally named lvl_genvk.py.

    - removed unused generator classes
    - added LVL class to build threading
    - added LVL class to build paramchecker
    - added LVL class to build uniqueobjects

Change-Id: If3ac7f6b554ed5b850aba83b5b20998b84990a41

7 years agolayers: Set up UniqueObjectsOutputGenerator class
Mark Lobodzinski [Tue, 11 Oct 2016 20:33:07 +0000 (14:33 -0600)]
layers: Set up UniqueObjectsOutputGenerator class

Implements the Vulkan XML API registry-based generation
of the unique_objects layer's unique_objects_wrappers.h
header file.

Change-Id: Ie2456216bb10726dab792d39b0b9d85bb1ba528c

7 years agolayers: Set up ThreadOutputGenerator class
Mark Lobodzinski [Tue, 11 Oct 2016 20:29:52 +0000 (14:29 -0600)]
layers: Set up ThreadOutputGenerator class

Implements the Vulkan XML API registry-based generation
of the threading layer's thread_check.h header file.

Change-Id: I50e828aaf9ce9d494520b476c2c73f44dd549a3c

7 years agolayers: Set up ParamCheckerOutputGenerator class
Mark Lobodzinski [Thu, 13 Oct 2016 14:36:42 +0000 (08:36 -0600)]
layers: Set up ParamCheckerOutputGenerator class

Implements the Vulkan XML API registry-based generation
of the parameter_validation layer's parameter_validation.h
header file.

Change-Id: Ib7be36121f4f21dd667d09f9bd5e82749a417a33

7 years agobuild: Add include files to make install target
Karl Schultz [Wed, 12 Oct 2016 23:36:35 +0000 (17:36 -0600)]
build:  Add include files to make install target

Change-Id: Ieaf84adc4a9345c1f5ef7646106dd00ff3e5e716

7 years agolayers: Add error enums to object tracker
Karl Schultz [Wed, 12 Oct 2016 19:28:49 +0000 (13:28 -0600)]
layers: Add error enums to object tracker

- Add error enum to many calls to ValidateObject().
- Specify null_allowed=true when VU allows it.
  (mostly Destroy* cases)

Change-Id: I61d94ea71cf885caad475c2012111c92bc7e9904

7 years agoloader: gh1026- Fix compiler warnings
Mark Young [Wed, 12 Oct 2016 20:18:44 +0000 (14:18 -0600)]
loader: gh1026- Fix compiler warnings

Fixed the compiler fixes encountered in the loader.

Change-Id: I4b3bb34b2d7e2231ccae61c684029af337d7c25e

7 years agodemos: Add .py extension to smoke build script
Mark Lobodzinski [Tue, 11 Oct 2016 15:25:23 +0000 (09:25 -0600)]
demos: Add .py extension to smoke build script

Change-Id: I7fbcdc26fe774baefbdb3796470f41c3393ddfda

7 years agoscripts: Add python extension to script
Mark Lobodzinski [Tue, 11 Oct 2016 15:21:19 +0000 (09:21 -0600)]
scripts: Add python extension to script

Change-Id: If5c338ba6eb991cc489ef0a37296a111917ddd52

7 years agobuild: Remove dead code from build script
Mark Lobodzinski [Tue, 11 Oct 2016 15:18:55 +0000 (09:18 -0600)]
build: Remove dead code from build script

Change-Id: Id6dbde9743573659b57c2ee60634245ca10a827a

7 years agoloader: Remove dead code from loader gen script
Mark Lobodzinski [Tue, 11 Oct 2016 15:17:57 +0000 (09:17 -0600)]
loader: Remove dead code from loader gen script

Change-Id: Ie6ad81c1f0097b93c3006a737d57a69d81ee70e8

7 years agolayers: Validate correct layout for STORAGE_IMAGE descriptors
Tobin Ehlis [Mon, 10 Oct 2016 20:02:48 +0000 (14:02 -0600)]
layers: Validate correct layout for STORAGE_IMAGE descriptors

According to the spec "Load and store operations on storage images can only
be done on images in VK_IMAGE_LAYOUT_GENERAL layout."

This change flags an error if a STORAGE_IMAGE descriptor is updated with an
image layout other than GENERAL.

7 years agocube.c: Remove excess tests from presentation fences
szdarkhack [Sat, 8 Oct 2016 06:51:22 +0000 (09:51 +0300)]
cube.c: Remove excess tests from presentation 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.

7 years agolayers: Update database file for spec on 10/11/16
Tobin Ehlis [Tue, 11 Oct 2016 15:59:09 +0000 (09:59 -0600)]
layers: Update database file for spec on 10/11/16

Update the error enum database file for spec as of 10/11/16.
There was only one change which was the removal of spurious </usage> tag
from error 500. Since this changed the error message, I had to force the
script to remap new 500 to the original 500.

Command line run to generate update:
python spec.py -update -remap 500-500

7 years agoscripts: Add database error check to spec.py
Tobin Ehlis [Tue, 11 Oct 2016 15:37:19 +0000 (09:37 -0600)]
scripts: Add database error check to spec.py

Fix broken database line where delimiter was incorrect.
Add check to spec.py script to detect if database line doesn't contain
expected number of elements and report error in that case.

7 years agolayers: Updating some CreateBuffer checks to use unique enums
Karl Schultz [Thu, 6 Oct 2016 23:53:48 +0000 (17:53 -0600)]
layers: Updating some CreateBuffer checks to use unique enums

Small batch of updates to use unique validation error enums and
messages for a few checks.  Updated the database file and
flagged some other checks that are missing with the error
enums and TODO notes.

Change-Id: I2020a88bbdcf7ea6d725f667523e89b160fe7ab8

7 years agolayers: Add validation flag for descriptor updates
Tobin Ehlis [Mon, 10 Oct 2016 17:14:52 +0000 (11:14 -0600)]
layers: Add validation flag for descriptor updates

Add update_descriptor_sets flag to bypass validation for
vkUpdateDescriptorSets() call.

7 years agolayers: Pass unique error codes through descriptor validation
Tobin Ehlis [Thu, 6 Oct 2016 23:43:11 +0000 (17:43 -0600)]
layers: Pass unique error codes through descriptor validation

Descriptor validation builds up error strings at multiple levels such as
UpdateError->WriteUpdate->BufferUpdate->BufferOffset. The final error is
then reported via a log_msg() call at the top level.

In order for this design to allow for the new unique error codes, we need
to pass error codes down the chain in the same way we pass error strings
down the chain.

This change adds error msg passing for descriptor updates. Many error
codes are added in as well as comments for codes that are missing or need
to be updated.

The database file is also updated to account for all of the checks that
were updated and/or reviewed.

7 years agolayers: Fix Windows build warnings
Mark Lobodzinski [Mon, 10 Oct 2016 20:05:59 +0000 (14:05 -0600)]
layers: Fix Windows build warnings

NOEXCEPT is defined multiple times

Change-Id: I9aef970e9588c17071cd71a31873db4090d50b07

7 years agodemos: Fix Windows build warnrings
Mark Lobodzinski [Mon, 10 Oct 2016 20:05:36 +0000 (14:05 -0600)]
demos: Fix Windows build warnrings

Change-Id: I733704e8904a77aa9071565cfc1d18b23b1c0c1c

7 years agodocs: GH429 change doc for shader_checker tests
Mark Mueller [Tue, 13 Sep 2016 22:21:50 +0000 (16:21 -0600)]
docs: GH429 change doc for shader_checker tests

This branch adds tests that challenge the validation layer on various
shader checker cases

Change-Id: I38072fb9afaa52148a24532e919c2ac81111480c

7 years agodemos: fix cubepp cross-platform build
Jeremy Hayes [Sun, 9 Oct 2016 19:57:43 +0000 (13:57 -0600)]
demos: fix cubepp cross-platform build

Change-Id: I823154dc0c61e7358d88fe6afc4f5808b640804d

7 years agodemos: fix uninitialized variable
Jeremy Hayes [Sun, 9 Oct 2016 19:48:31 +0000 (13:48 -0600)]
demos: fix uninitialized variable

Change-Id: If980d3a8d765185148cff0b037cb64e637ae8a75

7 years agodemos: fix cube cmake
Jeremy Hayes [Sun, 9 Oct 2016 18:26:27 +0000 (12:26 -0600)]
demos: fix cube cmake

Change-Id: Ia7a79bee7353ac484e691916591c585643a8753d

7 years agodemos: fix uninitialized variable
Jeremy Hayes [Sun, 9 Oct 2016 18:21:06 +0000 (12:21 -0600)]
demos: fix uninitialized variable

Change-Id: I1aa51806a82398fb03cfb81ae23782882d1e07ae

7 years agodemos: clang-format cube.cpp
Jeremy Hayes [Sun, 9 Oct 2016 17:48:12 +0000 (11:48 -0600)]
demos: clang-format cube.cpp

Change-Id: I5f55446eb6f3c312b6cc012733b7f4e454ac73ba

7 years agodemos: add cube cpp sample
Jeremy Hayes [Wed, 7 Sep 2016 21:55:11 +0000 (15:55 -0600)]
demos: add cube cpp sample

Demonstrate how to use vulkan.hpp.

Change-Id: Ia5ef4f55d45219aec607ae04efdb64c6ebbc9578

7 years agoheader: Move vulkan.hpp to version 1.0.30
Mark Lobodzinski [Fri, 7 Oct 2016 21:35:29 +0000 (15:35 -0600)]
header: Move vulkan.hpp to version 1.0.30

Change-Id: Ifb8a3577cd41ea4a36fea78c12d2a92ea5437e11

7 years agoloader: Move SOVERSION to version 1.0.30
Mark Lobodzinski [Fri, 7 Oct 2016 20:29:17 +0000 (14:29 -0600)]
loader: Move SOVERSION to version 1.0.30

Change-Id: I129086e47b0cdb12d31ffdd334d27c63e18dd097

7 years agolayers: Move Linux json files to version 1.0.30
Mark Lobodzinski [Fri, 7 Oct 2016 20:28:36 +0000 (14:28 -0600)]
layers: Move Linux json files to version 1.0.30

Change-Id: Ia54d78a9440f40b61601836fedcf68aba3c90dc1

7 years agolayers: Move Windows json files to version 1.0.30
Mark Lobodzinski [Fri, 7 Oct 2016 20:28:04 +0000 (14:28 -0600)]
layers: Move Windows json files to version 1.0.30

Change-Id: Iac3446e618e1b84be6d42eb7d3b55d3046b124d6

7 years agoheader: Move vk.xml to version 1.0.30
Mark Lobodzinski [Fri, 7 Oct 2016 20:26:07 +0000 (14:26 -0600)]
header: Move vk.xml to version 1.0.30

Change-Id: Id238f998c88d19f1549273359d559a602963c002

7 years agoheader: Move vulkan.h to version 1.0.30
Mark Lobodzinski [Fri, 7 Oct 2016 20:24:32 +0000 (14:24 -0600)]
header: Move vulkan.h to version 1.0.30

Change-Id: I99dd0d24feca887ea5c69e97856e96728491b0b5

7 years agolayers: Fix access violation in LVT
Mark Lobodzinski [Fri, 7 Oct 2016 20:13:38 +0000 (14:13 -0600)]
layers: Fix access violation in LVT

Was sending an out-of-scope memory reference to the display driver
in unique_objects::AllocateMemory.

Change-Id: I6b700445125acab040310682c96e7507d0fd91aa

7 years agolayers: Add flags for some descriptor validation
Tobin Ehlis [Thu, 6 Oct 2016 20:16:14 +0000 (14:16 -0600)]
layers: Add flags for some descriptor validation

Add flags that can gate descriptor checks for in-use descriptor,
push constant ranges, and allocate & free descriptors.

7 years agolayers: Updating descriptor checks to use unique enums
Tobin Ehlis [Thu, 6 Oct 2016 18:58:06 +0000 (12:58 -0600)]
layers: Updating descriptor checks to use unique enums

Initial batch of updates to use unique validation error enums and
messages for a few checks. Updated the database file and flagged
some other checks that are missing along with "TODO" notes in the
code.

7 years agoFix Android Windows build script
Cody Northrop [Fri, 7 Oct 2016 16:58:50 +0000 (10:58 -0600)]
Fix Android Windows build script

7 years agodemos: Fix typo in vulkaninfo
Karl Schultz [Fri, 7 Oct 2016 14:51:59 +0000 (08:51 -0600)]
demos: Fix typo in vulkaninfo

Change-Id: Id3ac6abb9288d2a36d68b67a605b4681ce20f539

7 years agoLayers: Implement unique_objects layer using vk.xml
Mark Lobodzinski [Tue, 6 Sep 2016 22:12:23 +0000 (16:12 -0600)]
Layers: Implement unique_objects layer using vk.xml

UniqueObjects was the final LVL layer not using vk.xml for codegen.
The new implementation follows the threading layer model which
(outside of safe_struct dependencies) is more tolerant of API
changes. Also updated for structure and style.

build-android/android-generate.bat - Updated for build
build-android/android-generate.sh  - Updated for build
generator.py                       - Added Unique Objects Generator
genvk.py                           - Added call to U_O generator
layers/CMakeLists.txt              - Updated for build
layers/unique_objects.cpp          - New: manually generated code
layers/unique_objects.h            - Now a true header file
vk-layer-generate.py               - killed!

Change-Id: I0d57871dfd2600829502f0bffd7cf6f926b7d5e7

7 years agolayers: Fix wayland build break
Tobin Ehlis [Thu, 6 Oct 2016 15:11:25 +0000 (09:11 -0600)]
layers: Fix wayland build break

Cut-and-paste error

7 years agolayers: Initial codegen of unique error enums
Tobin Ehlis [Wed, 5 Oct 2016 23:18:15 +0000 (17:18 -0600)]
layers: Initial codegen of unique error enums

This is the initial commit of spec.py script that's used to generate a header
and database file that contain unique error enums per valid usage line in the
spec.

The basic usage is just "python spec.py" which will write out a header file to
"vk_validation_error_messages.h" that contains unique error enum values for
each valid usage line in the current spec that's online at
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html

The header also contains validation_error_map with unique enum values as keys
that map to customized output messages for each validation error.

Updated one check to use the new model in core_validation.

The database file contains an enum value and error message on each line, as well
as fields indicating if the enum has been implemented in code and the testname
for a layer validation test that verifies that particular check. Initially the
implemented fields are set to 'U' and testname set to 'Unknown' to indicate that
they haven't yet been checked. Will be updated manually as the code is scrubbed
and new error enums are added.

When updating the header as the spec changes, the "-update" option to spec.py
will pull the database file and use it as a baseline reference to compare against
the updated spec. The script will attempt to keep errors with same message to have
the same error enum. When it's unsure if messages are updated or new, the script
will flag errors for manual review.

7 years agolayers: Fix buffer_view destroy ordering
Tobin Ehlis [Thu, 6 Oct 2016 03:50:14 +0000 (21:50 -0600)]
layers: Fix buffer_view destroy ordering

Don't destroy buffer_view from map until after invalidating bound cmd buffers.

7 years agolayers: Migrate surface/swapchain interaction from swapchain to CV
Chris Forbes [Thu, 6 Oct 2016 00:01:33 +0000 (13:01 +1300)]
layers: Migrate surface/swapchain interaction from swapchain to CV

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Track current and prev swapchains for each surface in CV
Chris Forbes [Thu, 6 Oct 2016 00:01:17 +0000 (13:01 +1300)]
layers: Track current and prev swapchains for each surface in CV

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Add handle to SWAPCHAIN_NODE
Chris Forbes [Wed, 5 Oct 2016 22:07:30 +0000 (11:07 +1300)]
layers: Add handle to SWAPCHAIN_NODE

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Change 'VS' to 'vertex shader'
Mike Weiblen [Tue, 4 Oct 2016 01:19:41 +0000 (19:19 -0600)]
layers: Change 'VS' to 'vertex shader'

Change-Id: Ib9b20635225528d2fd6d012e6487d95f27a0f95d

7 years agolayers: Add environment var for settings file
Lenny Komow [Fri, 30 Sep 2016 20:15:25 +0000 (14:15 -0600)]
layers: Add environment var for settings file

Change-Id: I8a614f915ab9b61eca5b3b94f4cf43a33cacf250

7 years agolayers: Fix state tracking for vkFlushMappedMemoryRanges()
Tobin Ehlis [Wed, 5 Oct 2016 13:50:25 +0000 (07:50 -0600)]
layers: Fix state tracking for vkFlushMappedMemoryRanges()

Checks for underflow and overflow when flushing mapped memory where using the
flush offset instead of the original mapped region offset to determine size of
total mapped region.

7 years agolayer: Add tracking of surface extensions (and surface objects) to CV
Chris Forbes [Tue, 4 Oct 2016 04:42:54 +0000 (17:42 +1300)]
layer: Add tracking of surface extensions (and surface objects) to CV

V2: Don't leave commented-out junk lying around; init
SURFACE_STATE::surface in default-constructed case.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Unify two generic object structs
Chris Forbes [Tue, 4 Oct 2016 22:33:23 +0000 (11:33 +1300)]
layers: Unify two generic object structs

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Only validate access masks if layout changes
Tony Barbour [Tue, 4 Oct 2016 18:03:50 +0000 (12:03 -0600)]
layers: Only validate access masks if layout changes

Change-Id: I21af32fb017de15760d72d4b32d99d84c383755f

7 years agodemos - fix cube's present barrier's dstAccessMask
Tony Barbour [Mon, 3 Oct 2016 22:01:41 +0000 (16:01 -0600)]
demos - fix cube's present barrier's dstAccessMask

Change-Id: I8f94d27f16864730514beb3e326b604f24bbb65a

7 years agolayers: Check for srcAccess in present barriers
Tony Barbour [Thu, 29 Sep 2016 19:41:49 +0000 (13:41 -0600)]
layers: Check for srcAccess in present barriers

Change-Id: I7722a31a6ef576cf8bc79c6893e70bc4b1cf1c09

7 years agoloader: gh1014- Fix physical device dispatch table
Slawomir Cygan [Wed, 5 Oct 2016 16:38:02 +0000 (18:38 +0200)]
loader: gh1014- Fix physical device dispatch table

Instead of initializing dispatch tabled for up to *pPhysicalDeviceCount devices, initialize
always all dispatch tables.

This fixes corruption _after_ VulkanCTS dEQP-VK.api.info.instance.physical_devices test.

Change-Id: I29ff42456bed9acb6d2c4016fe7f1940b7f4bd3b

7 years agoloader: Small cleanup of unnecessary func call
Mark Young [Tue, 4 Oct 2016 21:19:30 +0000 (15:19 -0600)]
loader: Small cleanup of unnecessary func call

We had a function that was called only from one other place and
it wasn't necessary.  So removed the extra function call.

Change-Id: I3579215dc1d2f46b8c30b4ec3cb416c390fcf597

7 years agolayers: Clean up Windows build warnings
Mark Lobodzinski [Mon, 3 Oct 2016 22:01:12 +0000 (16:01 -0600)]
layers: Clean up Windows build warnings

Change-Id: Iec47464d56c862cb1a6f132241d200d6f68efa21

7 years agodemos: Clean up Windows build warning
Mark Lobodzinski [Mon, 3 Oct 2016 22:00:40 +0000 (16:00 -0600)]
demos: Clean up Windows build warning

Change-Id: I39daaa144e82eeabbe532cb32d334d4e60e6a7e2