platform/upstream/Vulkan-Tools.git
8 years agolayers: add error to CmdNextSubpass if stepping beyond last subpass
Chris Forbes [Tue, 6 Sep 2016 23:44:08 +0000 (11:44 +1200)]
layers: add error to CmdNextSubpass if stepping beyond last subpass

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Make CmdNextSubpass more careful about side effects on failure
Chris Forbes [Tue, 6 Sep 2016 23:43:52 +0000 (11:43 +1200)]
layers: Make CmdNextSubpass more careful about side effects on failure

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Add MEMTRACK_INVALID_MEM_REGION error
Tobin Ehlis [Wed, 7 Sep 2016 00:46:55 +0000 (18:46 -0600)]
layers: Add MEMTRACK_INVALID_MEM_REGION error

Add new enum value "MEMTRACK_INVALID_MEM_REGION" to track case when a
region of an allocation bound to an image or buffer is not valid due
to the memory not being correctly updated.

This was previously aliased to USAGE_FLAG case which was masking the fact
that there are no tests written for this invalid mem region case.

8 years agolayers: Clarify invalid memory message
Tobin Ehlis [Wed, 7 Sep 2016 00:12:07 +0000 (18:12 -0600)]
layers: Clarify invalid memory message

Fixes #906

When reporting an invalid memory region, include the object type and
handle that is bound to that region.

8 years agoloader: Bump SOVERSION to 1.0.26
Mark Lobodzinski [Tue, 6 Sep 2016 22:32:34 +0000 (16:32 -0600)]
loader: Bump SOVERSION to 1.0.26

Change-Id: Ibe1378fe08686a88ae95dd1484c69ca71e2de6d3

8 years agolayers: Move Windows json files to version 1.0.26
Mark Lobodzinski [Tue, 6 Sep 2016 22:31:43 +0000 (16:31 -0600)]
layers: Move Windows json files to version 1.0.26

Change-Id: I8fb17f80ef3e83d04aa4868b3442a19a13feff8f

8 years agolayers: Move Linux json files to version 1.0.26
Mark Lobodzinski [Tue, 6 Sep 2016 22:30:58 +0000 (16:30 -0600)]
layers: Move Linux json files to version 1.0.26

Change-Id: Ia42d6867ba4a2c6bae4eae522c3f65d5a87567bd

8 years agoheader: Move vk.xml to verison 1.0.26
Mark Lobodzinski [Tue, 6 Sep 2016 22:29:05 +0000 (16:29 -0600)]
header: Move vk.xml to verison 1.0.26

Change-Id: Ie2bc2b5c15c4bad19083081727c88647113e3725

8 years agoheader: Move vulkan.h to version 1.0.26
Mark Lobodzinski [Tue, 6 Sep 2016 22:21:40 +0000 (16:21 -0600)]
header: Move vulkan.h to version 1.0.26

Note that part of these changes were made in a previous commit
that reversed the ValidationFlags changes.

Change-Id: I11cccfaa79e6dfa9e8ed276608612d56386f893a

8 years agoloader: Clean up failure handling in loader
Mark Young [Tue, 6 Sep 2016 19:53:03 +0000 (13:53 -0600)]
loader: Clean up failure handling in loader

The terminator_CreateInstance had a few extra things I wanted to
clean up.

Change-Id: Ia9246a44c3233f7f1b41289f6917ac107b8cf3a2

8 years agoloader: gh901 Fix loader w multiple ICDs
Mark Young [Tue, 6 Sep 2016 15:53:45 +0000 (09:53 -0600)]
loader: gh901 Fix loader w multiple ICDs

When an ICD failed during CreateInstance time, the loader needs
to remove the ICD from the list of available ICDs.

Change-Id: Id27a971e401ec9475b9488bdd95298e0f509f6b7

8 years agolayers: Use actual enum type name in err msg
Karl Schultz [Tue, 6 Sep 2016 16:26:09 +0000 (10:26 -0600)]
layers: Use actual enum type name in err msg

Change-Id: I4e7933349068984d7c99577158b6ff272e1d5282

8 years agowinsdk: Fix releases showing as older than alphas
Lenny Komow [Fri, 2 Sep 2016 20:05:45 +0000 (14:05 -0600)]
winsdk: Fix releases showing as older than alphas

8 years agoloader: Clean up loader_init_generic_list
Mark Young [Fri, 2 Sep 2016 17:45:00 +0000 (11:45 -0600)]
loader: Clean up loader_init_generic_list

Modify loader_init_generic_list so that it returns with count
and capacity of 0 if an error occurs.

Change-Id: I916f0dc0bf54a7897cf375bec0647f0379db1d0a

8 years agoloader: Rename DevExt to dev_ext
Mark Young [Fri, 2 Sep 2016 17:41:28 +0000 (11:41 -0600)]
loader: Rename DevExt to dev_ext

Make a quick change to conform a structure element to the coding
standard.

Change-Id: Icbf168b1ab451dcc4847a0c2c17d0cb40c0197b8

8 years agoloader: Modify loader_make_version
Mark Young [Fri, 2 Sep 2016 17:39:26 +0000 (11:39 -0600)]
loader: Modify loader_make_version

Modified loader_make_version to match the way we calculate the
version in other places.

Change-Id: Ia15e71fcfc0690836ed8ce1a3e9b6911988b57ff

8 years agobuild: Restore default symbol visibility to layers/tests
Karl Schultz [Fri, 2 Sep 2016 17:13:16 +0000 (11:13 -0600)]
build: Restore default symbol visibility to layers/tests

Layer tests broke with a previous commit to fix CXX
flags inheritance.  This commit repairs the problem.

Change-Id: Id54cfb737f32b6f11a4146225cc22e0b155ba2ba

8 years agobuild: gh672 Fix CMake CXX_FLAGS inheritance
Karl Schultz [Fri, 2 Sep 2016 16:17:05 +0000 (10:17 -0600)]
build: gh672 Fix CMake CXX_FLAGS inheritance

Some sub-projects were overwriting CMAKE_CXX_FLAGS instead of
inheriting from the parent.  This keeps any user settings outside
or above the top CMakeLists.txt file from reaching these sub-projects.

These fixes include preserving the inheritance, adding extra flags
to turn off warnings (mostly in autogen code) because the top
level turns on Wall, and trivial code fixes to avoid the need to
add a setting to turn off a warning for those trivial fixes.

These changes should have no impact on Windows.

Change-Id: I0c3c175cb5058f26a259ee3f4fde9fdaf3e6b00d

8 years agouse "exit /b", not "exit"
Jeff Juliano [Fri, 2 Sep 2016 12:24:25 +0000 (08:24 -0400)]
use "exit /b", not "exit"

"exit" terminates the cmd shell that invoked this script.

"exit /b" terminates only this bat script.

Change-Id: I1207545944ac2809c8f45a70f37e88cbdbc80aac

8 years agoFix VK_NV_external_memory_capabilities support
James Jones [Thu, 18 Aug 2016 22:41:19 +0000 (23:41 +0100)]
Fix VK_NV_external_memory_capabilities support

-Need to init the instance function pointer

-The function should gracefully fall back on
 drivers that don't support it.

Change-Id: I15b0c68028c8f5ad3b07342e255dbb4c37bb6f0a

8 years agodocs: Fix "Cautions" title
Mark Young [Thu, 1 Sep 2016 19:43:04 +0000 (13:43 -0600)]
docs: Fix "Cautions" title

GitHub Markdown doesn't support the sub-section we tried to use.
Instead, make this plain text, underlined and bolded.

Change-Id: Id20275c79f06b59c39ab9a9d118ddcbea6110ffa

8 years agoloader: gh851 wrap debug report callbacks
Mark Young [Thu, 25 Aug 2016 20:54:58 +0000 (14:54 -0600)]
loader: gh851 wrap debug report callbacks

Allow layers to wrap the debug report callbacks so they can
enable more messaging than the application, but also filter
the items returned.

Change-Id: I3fe8feecfa1838869de8a7338ff610e5ebca2e61

8 years agoheader: fix vulkan.hpp detection of 64-bit arch
Endre Oma [Thu, 1 Sep 2016 15:56:41 +0000 (17:56 +0200)]
header: fix vulkan.hpp detection of 64-bit arch

The generator that produced vulkan.hpp for 1.0.25 seemed to ignore the 64-bit architecture test, thereby breaking 64-bit builds.
The macro VK_DEFINE_NON_DISPATCHABLE_HANDLE is always defined according to vulkan.h.

8 years agolayers: Fix reporting of multiple allowed image view types
Chris Forbes [Wed, 31 Aug 2016 19:58:14 +0000 (12:58 -0700)]
layers: Fix reporting of multiple allowed image view types

This isn't the problem we were hitting in #890, but we'd produce a misleading message if multiple bits were allowed

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Don't spuriously produce an error if there are no view type bits set
Chris Forbes [Wed, 31 Aug 2016 19:00:35 +0000 (12:00 -0700)]
layers: Don't spuriously produce an error if there are no view type bits set

Previously we'd complain about any input attachment, since we don't constrain
its view type at all.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Impose singlesample/multisample constraints on input attachment descriptors
Chris Forbes [Wed, 31 Aug 2016 18:59:48 +0000 (11:59 -0700)]
layers: Impose singlesample/multisample constraints on input attachment descriptors

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoloader: Update script names with correct ext name
Mark Young [Thu, 1 Sep 2016 15:18:45 +0000 (09:18 -0600)]
loader: Update script names with correct ext name

lunarg_debug_report is now called ext_debug_report.

Change-Id: Ieceb323ac0a05def2f49ae399460b02b1e245639

8 years agoloader: gh888 Add KHR/EXT extensions in vulkan.h
Mark Young [Fri, 1 Jul 2016 21:18:27 +0000 (15:18 -0600)]
loader: gh888 Add KHR/EXT extensions in vulkan.h

Add the KHR_display_swapchain device extension to the loader
and the core_validation layers.  This fulfills the work required in
JIRA LOAD-7 and gh 90.

Add debug_marker to the extension list.

Change-Id: I1fb70e5d44bc8c1f70fd6d1cfbd106a155081b25

8 years agoAdd new text to discuss wrapping of objects, including cautions.
Ian Elliott [Wed, 31 Aug 2016 20:08:44 +0000 (14:08 -0600)]
Add new text to discuss wrapping of objects, including cautions.

This describes the process of wrapping and unwrapping objects, and provides
some cautions about the dangers of layers wrapping objects
(e.g. incompatibilities with unsupported extensions).

8 years agoheader: Update vulkan.hpp to 1.0.25
Lenny Komow [Wed, 31 Aug 2016 21:03:49 +0000 (15:03 -0600)]
header: Update vulkan.hpp to 1.0.25

8 years agoloader: Fixed some types and comments
Mark Lobodzinski [Wed, 31 Aug 2016 15:31:29 +0000 (09:31 -0600)]
loader: Fixed some types and comments

Change-Id: I66a5745a948c6677895950fdd48395afd5152ad7

8 years agoloader: Add support for NV device extension
Mark Lobodzinski [Mon, 29 Aug 2016 21:36:23 +0000 (15:36 -0600)]
loader: Add support for NV device extension

Added vkGetMemoryWin32HandleNV from the VK_NV_external_memory_win32
extension to the loader.

Change-Id: If6a959f126cc48ebf2608ed6e113e2883deae871

8 years agoloader: Add support for AMD device extension
Mark Lobodzinski [Mon, 29 Aug 2016 20:54:34 +0000 (14:54 -0600)]
loader: Add support for AMD device extension

Added vkCmdDrawIndirectCountAMD and vkCmdDrawIndexedIndirectCountAMD
from the VK_AMD_draw_indirect_count extension to the loader.

Change-Id: I4e1810dd6efcc54291a35d1ce9a15e59830689f3

8 years agoloader: Add support for NV instance extension
Mark Lobodzinski [Mon, 29 Aug 2016 20:21:14 +0000 (14:21 -0600)]
loader: Add support for NV instance extension

Added vkGetPhysicalDeviceExternalImageFormat API from the
VK_NV_external_memory_capabilities extension to the loader.

Change-Id: Ib87df7bae333d7944a4e181556bc2f99e1e19416

8 years agolayers: Update dispatch tables for new 1.0.25 APIs
Mark Lobodzinski [Mon, 29 Aug 2016 18:14:55 +0000 (12:14 -0600)]
layers: Update dispatch tables for new 1.0.25 APIs

Change-Id: I001583402bc99f923a776b238a82db5a60398f03

8 years agolayers: Update vulkan.py for new extension APIs
Mark Lobodzinski [Mon, 29 Aug 2016 17:56:02 +0000 (11:56 -0600)]
layers: Update vulkan.py for new extension APIs

Added extension protos and update extension lists for
VK_AMD_draw_indirect_count, VK_NV_external_memory_capabilities,
and VK_NV_external_memory_win32 new for header version 1.0.25.

Change-Id: Ifac0a2b4b7e36a8f907622e002ec419cc7c54f87

8 years agoloader: Bump SOVERSION to 1.0.25
Mark Lobodzinski [Mon, 29 Aug 2016 15:22:21 +0000 (09:22 -0600)]
loader: Bump SOVERSION to 1.0.25

Change-Id: I90a667a45cb02fb582fc59cbe0725ac633780d2d

8 years agolayers: Move windows json files to version 1.0.25
Mark Lobodzinski [Mon, 29 Aug 2016 15:21:24 +0000 (09:21 -0600)]
layers: Move windows json files to version 1.0.25

Change-Id: I063b38477237c9cd7966131361c44f859fc0d485

8 years agolayers: Move linux json files to version 1.0.25
Mark Lobodzinski [Mon, 29 Aug 2016 15:20:07 +0000 (09:20 -0600)]
layers: Move linux json files to version 1.0.25

Change-Id: Ice0f12ffea3c4702b9ea288fbe0e155a810185f5

8 years agoheader: Remove ValidationFlags changes from vk.xml
Mark Lobodzinski [Tue, 30 Aug 2016 20:11:39 +0000 (14:11 -0600)]
header: Remove ValidationFlags changes from vk.xml

The validation_flags features will be moved into an extension.

Change-Id: I05e0642c253f0c39361049b3677cdd037cb2a9ef

8 years agoheader: Move vk.xml to version 1.0.25
Mark Lobodzinski [Mon, 29 Aug 2016 15:17:23 +0000 (09:17 -0600)]
header: Move vk.xml to version 1.0.25

Change-Id: I7f24c5a5cbfa00e3f8bc331b63fb26c8912da2dd

8 years agoheader: Move vk_platform.h to version 1.0.25
Mark Lobodzinski [Mon, 29 Aug 2016 15:16:59 +0000 (09:16 -0600)]
header: Move vk_platform.h to version 1.0.25

Change-Id: I71d8609bbd75af5832923c94e0fee9f1b2b0fcac

8 years agoheader: Remove ValidationFlags changes from vulkan.h
Mark Lobodzinski [Tue, 30 Aug 2016 20:11:18 +0000 (14:11 -0600)]
header: Remove ValidationFlags changes from vulkan.h

The validation_flags features will be moved into an extension.

Change-Id: I435e75da8d8917f876e5bc904922cda26a87845a

8 years agoheader: Move vulkan.h to version 1.0.25
Mark Lobodzinski [Mon, 29 Aug 2016 15:02:13 +0000 (09:02 -0600)]
header: Move vulkan.h to version 1.0.25

Change-Id: I2ad2c33c720f992953e8d5886dc2c55ad789fe83

8 years agodoc: Update loaderandlayerinterface
Mark Young [Wed, 31 Aug 2016 17:53:26 +0000 (11:53 -0600)]
doc: Update loaderandlayerinterface

Added more information about layer wrapping, specifically requiring
support for extensions.

Change-Id: Ie60952f41c976b8e0245810c550b133dc5843097

8 years agowinsdk: Correct installer log renaming
Lenny Komow [Wed, 31 Aug 2016 16:41:19 +0000 (10:41 -0600)]
winsdk: Correct installer log renaming

8 years agodocs: GH428 Update doc for sync validation test cases
Mark Mueller [Thu, 25 Aug 2016 21:43:30 +0000 (15:43 -0600)]
docs: GH428 Update doc for sync validation test cases

Change-Id: I101b66f6413b82e54ebc3931dc740695921a57bf

8 years agolayers: GH428 Adding skip_call to DestroySemaphore
Mark Mueller [Wed, 24 Aug 2016 16:42:17 +0000 (10:42 -0600)]
layers: GH428 Adding skip_call to DestroySemaphore

Use skip_call return from log_msg callback to decide
whether or not to pass the call to lower layers.

Change-Id: I96090539e9001bbda32533055b143c872d88e4bf

8 years agowinsdk: Fix powershell error to say ConfigureRT
Lenny Komow [Wed, 31 Aug 2016 15:45:46 +0000 (09:45 -0600)]
winsdk: Fix powershell error to say ConfigureRT

8 years agowinsdk: Remove rt installer using msvcr120.dll
Lenny Komow [Wed, 31 Aug 2016 00:38:05 +0000 (18:38 -0600)]
winsdk: Remove rt installer using msvcr120.dll

8 years agowinsdk: Fix uninstall log not clearing old copies
Lenny Komow [Tue, 30 Aug 2016 22:43:39 +0000 (16:43 -0600)]
winsdk: Fix uninstall log not clearing old copies

8 years agolayers: Fix Dota2 crash in Windows
Mark Lobodzinski [Tue, 30 Aug 2016 17:30:04 +0000 (11:30 -0600)]
layers: Fix Dota2 crash in Windows

Two issues, in_use was not initialized in SAMPLER_NODE and an invalid
access during resource tracking for SAMPLER_NODE and SET_NODE. This
occured during GetFenceStatus after a call to DestroySampler.

Change-Id: I7654a7c4a2677450097643422f44290be5dbac2a

8 years agolayers: PR887, Add extension white-list
Mark Lobodzinski [Fri, 26 Aug 2016 14:48:02 +0000 (08:48 -0600)]
layers: PR887, Add extension white-list

The unique_objects layer wraps objects -- layers that wrap objects
should output an error message if used with any extension that is
not explicitly supported by the layer. Added a whitelist of supported
extensions and error messages for unsupported extensions.

Change-Id: I9ce0acb22ddfa5b81e36c7e03fffad0777b5410d

8 years agolayers: Add white-list helper to layer utils
Mark Lobodzinski [Fri, 26 Aug 2016 14:47:37 +0000 (08:47 -0600)]
layers: Add white-list helper to layer utils

Change-Id: Idfc67481589ea9698ab82501889680044fcf8276

8 years agolayers: Add unique_objects to layer settings file
Mark Lobodzinski [Fri, 26 Aug 2016 14:37:44 +0000 (08:37 -0600)]
layers: Add unique_objects to layer settings file

Enable config file control of debug output from the unique_objects
layer.

Change-Id: I31ac885743aa3b03b70b55329b3fea852db2cd27

8 years agolayers: Add unique_objects to default layer config
Mark Lobodzinski [Fri, 26 Aug 2016 14:35:19 +0000 (08:35 -0600)]
layers: Add unique_objects to default layer config

Allows messages to be output from this layer in configurations with
no explicit output settings.

Change-Id: I17c604db7461ae10eedd0b3fb3f9440a6dc52eab

8 years agolayers: Add debug report support to unique_objects
Mark Lobodzinski [Thu, 25 Aug 2016 20:49:38 +0000 (14:49 -0600)]
layers: Add debug report support to unique_objects

Change-Id: Ib276761a94e627c0e5504ca22737649c7722113c

8 years agodemos: Update some of the WSI code to match the spec example code
Ian Elliott [Fri, 19 Aug 2016 09:46:58 +0000 (03:46 -0600)]
demos: Update some of the WSI code to match the spec example code

A pending Vulkan spec change contains updates to the WSI example code.  This is
a coordinated, cosmetic change, that allows the example code and demo code to
more-closely match.

8 years agobuild: update spirv and glslang revisions
Mark Young [Fri, 26 Aug 2016 22:54:43 +0000 (16:54 -0600)]
build: update spirv and glslang revisions

Updated to more recent SPIRV, SPIRV_headers, and glslang commits.
This also required updating the overall build to use a new
library SPVRemapper.lib.

Change-Id: I47573be7a1fe62c519f504920590ceb6510a7a13

8 years agoloader: Update SO version for 1.0.24 header
Mark Lobodzinski [Fri, 26 Aug 2016 21:06:31 +0000 (15:06 -0600)]
loader: Update SO version for 1.0.24 header

Change-Id: Ie159ffd434b98e5679e7645dc8dc4c913b26fa4f

8 years agoheader: Update vulkan.hpp to 1.0.24
Lenny Komow [Fri, 26 Aug 2016 20:10:08 +0000 (14:10 -0600)]
header: Update vulkan.hpp to 1.0.24

8 years agolayers: Modify format queries for enums
Mark Lobodzinski [Fri, 26 Aug 2016 17:31:25 +0000 (11:31 -0600)]
layers: Modify format queries for enums

As part of the 1.0.24 header updates, changed the format information
query functions to lookup via a map in order to handle non-sequential
format enums incorporated as part of an extension.

Change-Id: I558d710889c7e9f6878141a8213777afb1077c99

8 years agoheader: Update vk.xml to 1.0.24
Mark Lobodzinski [Fri, 26 Aug 2016 16:25:27 +0000 (10:25 -0600)]
header: Update vk.xml to 1.0.24

Change-Id: I3825299492a89ea9d43f42052877e91bd2f8f76f

8 years agoheader: Update vk_platform.h to 1.0.24
Mark Lobodzinski [Fri, 26 Aug 2016 16:19:57 +0000 (10:19 -0600)]
header: Update vk_platform.h to 1.0.24

Change-Id: Ic256fc2ae1214b26b32a3f61459235359cfd8249

8 years agoheader: Update vulkan.h to 1.0.24
Mark Lobodzinski [Fri, 26 Aug 2016 16:19:18 +0000 (10:19 -0600)]
header: Update vulkan.h to 1.0.24

Change-Id: I1114e34656061fb2de34649c63dd480ec6069d77

8 years agolayers: Allow input attachment usage in CreateImageView
Tony Barbour [Fri, 26 Aug 2016 19:01:43 +0000 (13:01 -0600)]
layers: Allow input attachment usage in CreateImageView

Change-Id: Ic0bea63b6ec898e496ba124b57ad8b848bdd0b7d

8 years agolayers: Update json files for 1.0.24 header
Mark Lobodzinski [Fri, 26 Aug 2016 20:41:42 +0000 (14:41 -0600)]
layers: Update json files for 1.0.24 header

Change-Id: I151125e8cc140d41b533707eb1b28dbe9b63a914

8 years agoloader: Update resource context default version
Mark Young [Fri, 26 Aug 2016 20:14:47 +0000 (14:14 -0600)]
loader: Update resource context default version

The loader had a stale file version.  This version gets replaced
as part of a standard SDK build, but we should have a unique
ID for a developer built loader.  I updated it to have build 1111
and patch 2222 by default.

Change-Id: I70c3152b2ea5f29a072af94ca5f5a19227bbee67

8 years agodocs: Update README.md for Glslang issue
Mark Young [Fri, 26 Aug 2016 19:22:31 +0000 (13:22 -0600)]
docs: Update README.md for Glslang issue

Update the README.md to have a note about updating your Nvidia
driver to resolve failures with the glslang hack removal.

Change-Id: Id1b71cc7baae90571bef624f07ff1c7511718b0c

8 years agoRevert "glslang/spirv: Update repo revisions"
Mark Young [Fri, 26 Aug 2016 17:50:50 +0000 (11:50 -0600)]
Revert "glslang/spirv: Update repo revisions"

This reverts commit d6decaa8f78fba8746c55e9247add042b90b56fa.

Attempting to see if this is causing the newly encountered errors
on Nvidia Linux, or if it's related to the glslang issue that
was fixed and people just need to update drivers.

8 years agolayers: Update layer details doc
Mark Lobodzinski [Wed, 24 Aug 2016 13:53:27 +0000 (07:53 -0600)]
layers: Update layer details doc

For new sampleCount/Image tests

Change-Id: Ie857e56b38170e343486f2958a4d5afe7fcdcc12

8 years agolayers: Add validation for image samplecounts
Mark Lobodzinski [Tue, 23 Aug 2016 21:10:36 +0000 (15:10 -0600)]
layers: Add validation for image samplecounts

Check that an image's sampleCount is valid for BlitImage,
CopyImageToBuffer and CopyBufferToImage.

Change-Id: I5e012e35bd2eb87cd42798a0cacdb03ed64b3c3b

8 years agoglslang : Force update in update_external_sources
Mark Young [Fri, 26 Aug 2016 17:17:39 +0000 (11:17 -0600)]
glslang : Force update in update_external_sources

Linux's sh file didn't clobber previous external items synced.
This is having a problem with the previous changes which reverted
the glslang texel fetch patch, and then updated the revision.

Change-Id: I0e8e28d11fa40df00a5fb9164624f113b2adf084

8 years agoglslang/spirv: Update repo revisions
Mark Young [Fri, 26 Aug 2016 15:04:24 +0000 (09:04 -0600)]
glslang/spirv: Update repo revisions

Update the SPIR-V Tools, SPIR-V Headers, and Glslang revisions
for the upcoming SDK.

Change-Id: I12d57d75691d1a0e40efd986247ecdb58bf0bf61

8 years agoglslang: Remove change to revert texel fetch fix.
Mark Young [Fri, 26 Aug 2016 02:12:05 +0000 (20:12 -0600)]
glslang: Remove change to revert texel fetch fix.

Previously, we had to revert a texel fetch fix in glslang as
part of the update_external_sources.bat/sh due to a bug in the
certain drivers.  The drivers have been fixed and released so
we can remove the change.

Change-Id: I018a0dbbc5fb27d7fbd91bc3073f0f5bef5cd346

8 years agolayers: return collect_* result containers rather than using & out
Chris Forbes [Tue, 23 Aug 2016 01:04:34 +0000 (13:04 +1200)]
layers: return collect_* result containers rather than using & out

This is clearer at the call site, should be no slower in C++11+, and
complies with the style guide.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodemos: Restore Wayland compile behavior in cube
Tony Barbour [Thu, 25 Aug 2016 19:14:45 +0000 (13:14 -0600)]
demos: Restore Wayland compile behavior in cube

And document supported configurations

Change-Id: Ib6cdccf48c75373acfc2ebe625719360caa16657

8 years agodemos: GH862 Fix build errors of demos (cube, vulkaninfo) on the wayland only window...
Mun Gwan-gyeong [Sat, 20 Aug 2016 05:46:22 +0000 (14:46 +0900)]
demos: GH862 Fix build errors of demos (cube, vulkaninfo) on the wayland only window system

Change-Id: I76a36e3aad059356bcb69455702ade1cfec8b924
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
8 years agolayers: GH849: Defend against poorly-written applications
Ian Elliott [Wed, 24 Aug 2016 17:30:45 +0000 (11:30 -0600)]
layers: GH849: Defend against poorly-written applications

A test application was written that didn't properly call some count-based query
commands.  In this particular case, they always hard-coded the count variable
to 1 the 2nd time the query was called.  The swapchain layer was only recording
the 1st count value in this case, and this caused a seg fault when the
vkCreateSwapchainKHR command validation code was run.

This commit better defends against such poorly-written applications, so that
the vkCreateSwapchainKHR command validation code won't seg fault.  This
includes looking for VK_INCOMPLETE as a successful return code from the ICD.

8 years agolayers: Fix paramter_validation array name codegen
Dustin Graves [Fri, 22 Jul 2016 19:20:44 +0000 (13:20 -0600)]
layers: Fix paramter_validation array name codegen

Replace std::string with ParameterName for the generated
parameter_validation layer code so that the parameter names
printed by the generated code contain the correct array
subscript values.  Also updates the parameter_validation
tests to reflect the change to the printed names.

Issues-Addressed: GitHub #462
Change-Id: I3032e08052fc003ba066bbe613e5faf3ed049964

8 years agolayers: Fix parameter_validation array name format
Dustin Graves [Fri, 22 Jul 2016 19:19:46 +0000 (13:19 -0600)]
layers: Fix parameter_validation array name format

Replace std::string with ParameterName for the parameter_validation
utility functions so that the parameter names printed by these
functions contain the correct array subscript values.

Issues-Addressed: GitHub #462
Change-Id: I09fc6a45e8e41ba28ef7d8fc44ce9e8874feefad

8 years agolayers: Add parameter name formatting class
Dustin Graves [Fri, 22 Jul 2016 19:19:02 +0000 (13:19 -0600)]
layers: Add parameter name formatting class

Add a custom parameter name class with support for deferred
formatting of names containing array subscripts.  The class
stores a format string and a vector of index values, and
performs string formatting when an accessor function is called
to retrieve the name string.

Change-Id: I941116a16b6fa19e63314cbeab33223e0fa072d3

8 years agoloader: Fix build warning on Linux
Mark Lobodzinski [Wed, 24 Aug 2016 14:09:29 +0000 (08:09 -0600)]
loader: Fix build warning on Linux

Change-Id: Iae099e6edffacdfad010aebe099e8e13d2ef8510

8 years agolayers: Update descriptor binding to use an ordered map
Tobin Ehlis [Mon, 22 Aug 2016 16:10:43 +0000 (10:10 -0600)]
layers: Update descriptor binding to use an ordered map

When dealing with dynamic offsets, the binding numbers, and array indices within
a binding, are all sequential.
This is according to the spec "Descriptor Set Binding" section which states,
"...entries are ordered by the binding numbers in the descriptor set layouts; and
within a binding array, elements are in order."

This means when processing the binding numbers to validate the dynamic offsets at
draw time, we should do so in order to make sure that the sequential dynamic offset
index correctly correlates with the dynamic offset being processed.

8 years agotests: Add InvalidCmdBufferDescriptorSetImageSamplerDestroyed test
Tobin Ehlis [Wed, 17 Aug 2016 23:00:07 +0000 (17:00 -0600)]
tests: Add InvalidCmdBufferDescriptorSetImageSamplerDestroyed test

This test hits 3 newly added checks of an invalid cmd buffer at submit time due to:
1. Bound descriptor set sampler being destroyed
2. Bound descriptor set image being destroyed
3. Bound descriptor set being destroyed

8 years agotests: Add InvalidCmdBufferDescriptorSetBufferDestroyed test
Tobin Ehlis [Wed, 17 Aug 2016 20:57:58 +0000 (14:57 -0600)]
tests: Add InvalidCmdBufferDescriptorSetBufferDestroyed test

This test creates a cmd buffer and binds a buffer-type descriptor set.
Then it detroys the buffer prior to submitting cmd buffer and verifies
that the cmd buffer is flagged as invalid.

8 years agolayers: Add cmd buffer binding for descriptor resources
Tobin Ehlis [Wed, 17 Aug 2016 19:33:44 +0000 (13:33 -0600)]
layers: Add cmd buffer binding for descriptor resources

This commit creates bindings between a cmd buffer and the images/buffers
and their memory allocations that are tied to that cmd buffer's active
descriptor slots (set/binding combination).
The active resources are anything that's in use during any of the draws
issued in the cmd buffer.
If any of the bound resources are deleted, the cmd buffer will become
invalid and an error will be issued on the next attempt to submit it.

8 years agolayers: Refactor functions to bing image/buffer to cmd buffer
Tobin Ehlis [Wed, 17 Aug 2016 19:12:19 +0000 (13:12 -0600)]
layers: Refactor functions to bing image/buffer to cmd buffer

The AddCommandBufferBinding[Image|Buffer]() functions both had an
unused parameter that was killed, and they both returned a bool
that was not needed so removed that too.
Also made layer_data* param const and put prototypes into
core_validation_types.h in prepration of using these functions
from the DescriptorSet class.

8 years agolayers: Add tracking between sampler and cmd buffer
Tobin Ehlis [Wed, 17 Aug 2016 17:10:41 +0000 (11:10 -0600)]
layers: Add tracking between sampler and cmd buffer

Update SAMPLER_NODE to inherit from BASE_NODE and keep track of
cb_bindings for sampler.
At draw time, add any bindings between cmd buffer and samplers that
are connected to active descriptors.
At DestroySampler() time, set CB_INVALID for any cmd buffers in
cb_bindings.
Also includes some additional plumbing to prepare for connecting
images/buffers that are tied to descriptor sets to cmd buffers that
those sets are bound to.

8 years agolayers: Only bind active sets to cmd buffers
Tobin Ehlis [Wed, 17 Aug 2016 15:49:13 +0000 (09:49 -0600)]
layers: Only bind active sets to cmd buffers

Don't create a binding between every set bound to a cmd buffer, but only
the sets that are verified active at draw time.
Gather up active descriptorset bindings in prepration of also binding the
resources from each individual active set to the cmd buffer.

8 years agolayers: Migrate PIPELINE_NODE to core_validation_types.h
Tobin Ehlis [Wed, 17 Aug 2016 13:55:55 +0000 (07:55 -0600)]
layers: Migrate PIPELINE_NODE to core_validation_types.h

Move PIPELINE_NODE struct to core_validation_types.h so that it's visible to
descriptorSet class. Update cmd buffer lastBound state to store ptr to
PIPELINE_NODE instead of VkPipeline which saves extra lookups.

8 years agolayers: Minor re-naming in core_validation
Tobin Ehlis [Thu, 21 Jul 2016 23:51:22 +0000 (17:51 -0600)]
layers: Minor re-naming in core_validation

Rename a bit of code as I touch it to match general code style.
Switch a few CamelCase to lower_case and use "dev_data" instead
of "my_data" as it's more descriptive.

8 years agolayers: Add descriptor sets to CB_INVALID tracking
Tobin Ehlis [Thu, 21 Jul 2016 20:40:22 +0000 (14:40 -0600)]
layers: Add descriptor sets to CB_INVALID tracking

This is start of a series intended to enable CB_INVALID tracking for
descriptor sets. Much of the tracking is already in place in the
special-purpose uniqueBoundSets data struct, so I'll be migrating
the tracking from that struct to the more general-purpose
object_bindings set.

8 years agolayers: GH873, Fix ETC2 RGBA format class size
Mark Lobodzinski [Tue, 23 Aug 2016 14:49:36 +0000 (08:49 -0600)]
layers: GH873, Fix ETC2 RGBA format class size

These formats were incorrectly specified as using an 8-byte storage
class, but each 4x4 block is actually compressed to 128 bits.

Change-Id: I33353cbe3574f0c640b68c8c3c544a286c79ed49

8 years agolayers: GH877, Clear up descriptor state messages
Mark Lobodzinski [Tue, 23 Aug 2016 17:12:05 +0000 (11:12 -0600)]
layers: GH877, Clear up descriptor state messages

Plumbed function name through for more descriptive error
messages from validate_and_update_drawtime_descriptor_state().

Change-Id: I109e14e07e6a5ba29c45dc3e0ad075ff3575d67f

8 years agolayers: Update layer details doc for new tests
Mark Lobodzinski [Mon, 22 Aug 2016 17:34:50 +0000 (11:34 -0600)]
layers: Update layer details doc for new tests

Change-Id: I9a0cca05f387c291494edf6970e0dd34d5922fe6

8 years agolayers: Add Image Transfer Granularity checking
Mark Lobodzinski [Mon, 22 Aug 2016 15:21:03 +0000 (09:21 -0600)]
layers: Add Image Transfer Granularity checking

CmdCopyImage and CmdCopyImageToBuffer/CmdCopyBufferToImage have
parameters that must respect the Image Transfer Granularity
requirements set in queue family property minImageTransferGranularity.

Change-Id: Ic0fed33c201310bafe86f6f509a63b675de1d572

8 years agolayers: Update layer validation details doc
Mark Lobodzinski [Fri, 19 Aug 2016 17:03:01 +0000 (11:03 -0600)]
layers: Update layer validation details doc

Updated entry for new BufferImageCopy checks.

Change-Id: I85ea2eeacae6885fbd6729180167cbe1abe4c176

8 years agolayers: GH763, Add validation for VkBufferImageCopy
Mark Lobodzinski [Fri, 19 Aug 2016 14:50:15 +0000 (08:50 -0600)]
layers: GH763, Add validation for VkBufferImageCopy

Added valid usage checks for members of this structure used in
vkCmdCopyImageToBuffer and vkCmdCopyBufferToImage.

Change-Id: I62ec7b04504e91fa33c86d1a5b606ba8fb7a294a

8 years agolayers: Leave INDEX_BUFFER_BOUND set in set_cb_pso_status
Tony Barbour [Mon, 22 Aug 2016 22:10:02 +0000 (16:10 -0600)]
layers: Leave INDEX_BUFFER_BOUND set in set_cb_pso_status

Change-Id: I5ca986c95b97cdf97a0f65b0c34db32d91428645