platform/upstream/Vulkan-Tools.git
7 years agolayers: Update vuid scripts for Windows, python3
Mark Lobodzinski [Mon, 5 Jun 2017 19:50:10 +0000 (13:50 -0600)]
layers: Update vuid scripts for Windows, python3

Change-Id: I1ec5ae94677412a8a6318f99f09b1fa095bf97ab

7 years agoscripts:Update VUIDs for spec 1.0.51
Tobin Ehlis [Mon, 5 Jun 2017 19:26:52 +0000 (13:26 -0600)]
scripts:Update VUIDs for spec 1.0.51

This is the first spec update using the new json process.
Updated text for a number of IDs and also added 9 new IDs.

Update command was "python spec.py -update"

7 years agoscripts:Update json parsing and vuid update
Tobin Ehlis [Mon, 5 Jun 2017 19:23:44 +0000 (13:23 -0600)]
scripts:Update json parsing and vuid update

Account for new "validation" top-level in json file when parsing.
Also fix a couple of bugs: wasn't correctly translating ID to hex for
new new IDs and wasn't setting implicit state for new IDs.

7 years agoheader: Update to 1.0.51 Vulkan version
Mark Lobodzinski [Mon, 5 Jun 2017 15:27:30 +0000 (09:27 -0600)]
header: Update to 1.0.51 Vulkan version

- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- built and included new vulkan.hpp file

Change-Id: I4f1d5609c8377047165e2ba14e89cba9877436db

7 years agolayers: Fix bad behavior in repeated calls to CV GetSwapchainImagesKHR
Chris Forbes [Fri, 2 Jun 2017 23:50:11 +0000 (16:50 -0700)]
layers: Fix bad behavior in repeated calls to CV GetSwapchainImagesKHR

7 years agolayers: Fix some typos
Chris Forbes [Fri, 2 Jun 2017 00:39:02 +0000 (17:39 -0700)]
layers: Fix some typos

7 years agolayers: Remove FRAMEBUFFER_STATE::referencingCommandBuffers
Chris Forbes [Thu, 1 Jun 2017 23:49:18 +0000 (16:49 -0700)]
layers: Remove FRAMEBUFFER_STATE::referencingCommandBuffers

Nothing used this.

7 years agolayers: Remove MT_FB_ATTACHMENT_INFO::mem
Chris Forbes [Thu, 1 Jun 2017 23:48:05 +0000 (16:48 -0700)]
layers: Remove MT_FB_ATTACHMENT_INFO::mem

Nothing used this.

7 years agolayers: Remove dead device queue tracking from swapchain
Chris Forbes [Thu, 1 Jun 2017 18:37:58 +0000 (11:37 -0700)]
layers: Remove dead device queue tracking from swapchain

7 years agolayers: remove useless check from GetSwapchainImagesKHR
Chris Forbes [Thu, 1 Jun 2017 18:07:16 +0000 (11:07 -0700)]
layers: remove useless check from GetSwapchainImagesKHR

This is a relic from a /very/ old version of the WSI extensions, and
appears to be checking driver correctness more than app correctness.

7 years agolayers: Remove check from swapchain already done by OT
Chris Forbes [Thu, 1 Jun 2017 18:07:36 +0000 (11:07 -0700)]
layers: Remove check from swapchain already done by OT

7 years agoloader: Fix buffer overflow in loader_add_to_dev_ext_list
Gabríel Arthúr Pétursson [Sat, 3 Jun 2017 01:38:49 +0000 (01:38 +0000)]
loader: Fix buffer overflow in loader_add_to_dev_ext_list

The size argument to a call to memcpy is for the wrong struct. The type
of `ext->list[idx].props` is VkExtensionProperties.

Credit goes to AddressSanitizer for spotting this bug.

7 years agoloader: Add emulation for EXT inst extensions
Lenny Komow [Thu, 1 Jun 2017 19:32:28 +0000 (13:32 -0600)]
loader: Add emulation for EXT inst extensions

Change-Id: I481ff8a2ae0ec5a82773fddd2b59c750126adc11

7 years agodemos: Fix fence sync after new throttling scheme
Tony Barbour [Fri, 2 Jun 2017 18:11:29 +0000 (12:11 -0600)]
demos: Fix fence sync after new throttling scheme

f06ab9 cube: Throttle rendering rather than presentation didn't
remove the AMD workaround and didn't consider the VK_ERROR_OUT_OF_DATE_KHR
path through resize.

Change-Id: Ib29bffb5b3c2a82456ad734424af3a9348e897c5

7 years agotests: Add ExceedMemoryAllocationCount using profile layer
Tony Barbour [Tue, 16 May 2017 20:07:27 +0000 (14:07 -0600)]
tests: Add ExceedMemoryAllocationCount using profile layer

Change-Id: I363acfff6cffa5966813dbfd30bb0c28810bd145

7 years agolayers: Add todo for pNext ext dependency codegen
Mark Lobodzinski [Wed, 31 May 2017 17:24:58 +0000 (11:24 -0600)]
layers: Add todo for pNext ext dependency codegen

Change-Id: I5754ceeccca23723282b834e6fe9feadc1d74ae1

7 years agolayers: Add missing/disabled extension validation
Mark Lobodzinski [Wed, 31 May 2017 16:18:44 +0000 (10:18 -0600)]
layers: Add missing/disabled extension validation

Many of the main validation checks were ifdef'd out or were missing
entirely.

Change-Id: I18cd977a6a790cc12988c55093d826ab9ec50556

7 years agolayers: Remove redundant device ext dep checks
Mark Lobodzinski [Wed, 31 May 2017 16:07:25 +0000 (10:07 -0600)]
layers: Remove redundant device ext dep checks

These are now handled through code-gen.

Change-Id: I1430f25fbe151b5581bb57292e733e8ba66cbdf7

7 years agolayers: Remove redundant instance ext dep checks
Mark Lobodzinski [Wed, 31 May 2017 15:55:17 +0000 (09:55 -0600)]
layers: Remove redundant instance ext dep checks

These are now handled through code-gen.

Change-Id: I773a2a3a5e531ba24108aeadf3fd67239a20c5e3

7 years agoLayers: Implement PV per-API ext dependency checks
Mark Lobodzinski [Wed, 31 May 2017 15:14:22 +0000 (09:14 -0600)]
Layers: Implement PV per-API ext dependency checks

As each API is used, PV will now us a code-generated check to verify
that all of the required extensions for this particular API call have
been enabled via CreateInstance or CreateDevice.

Change-Id: I1c11d0b8322edf005b2b197a415c92a82e0cb810

7 years agolayers: Pass layer data into PV validation functions
Mark Lobodzinski [Tue, 30 May 2017 20:11:04 +0000 (14:11 -0600)]
layers: Pass layer data into PV validation functions

Previously just passed in report data, but need access to more stuff.

Change-Id: I2af7b2ae73d3e2ecd3409f32e8f1a42e5e736d8c

7 years agolayers: Move PV layer data structs into header
Mark Lobodzinski [Tue, 30 May 2017 20:21:21 +0000 (14:21 -0600)]
layers: Move PV layer data structs into header

Change-Id: Ie8fb823f1bfa97047cb2d361bc0daea5ee504673

7 years agoLayers: Add code-gen'd calls to val exts
Mark Lobodzinski [Tue, 30 May 2017 18:02:17 +0000 (12:02 -0600)]
Layers: Add code-gen'd calls to val exts

Modified PV code gen to insert and make calls to validate
extension dependencies.

Change-Id: I90103b16d36fb868b32df796b1dae7741dfcba34

7 years agolayers: Remove duplicate check and dead code
Mike Schuchardt [Wed, 31 May 2017 15:28:44 +0000 (09:28 -0600)]
layers: Remove duplicate check and dead code

Change-Id: Ib25a9fc9052897eccb244d85122b451bda02f892

7 years agolayers: PV code gen for FlagBits enum parameters
Mike Schuchardt [Wed, 31 May 2017 15:14:22 +0000 (09:14 -0600)]
layers: PV code gen for FlagBits enum parameters

Extend validate_flags to work in instances where a single Vk*FlagBits
enum value is valid instead of a bitmask with multiple values.

Change-Id: Ib8d34551923f7ecb2549500dfde674fa1094ac8b

7 years agolayers: Add VU offset checks to BlitImage
Dave Houlton [Fri, 26 May 2017 21:01:46 +0000 (15:01 -0600)]
layers: Add VU offset checks to BlitImage

Added 10 VU checks to CmdBlitImage around the offset values in the
VkImageBlit struct.  Cleaned up a few tests that were tripping
these checks inadvertently. Added BlitImageOffsets test.

Also updated the appended error message number to match the new
8-char hex format.

Change-Id: I75d319cce6bbe96e8686e0bad3c4a0d58922b7a4

7 years agoloader: Emulate surface capabilities 2
Lenny Komow [Tue, 30 May 2017 19:04:46 +0000 (13:04 -0600)]
loader: Emulate surface capabilities 2

Add loader emulation for VK_KHR_get_surface_capabilities2 commands

Change-Id: I1de99d1bc94d6ec1191601e75b79c5c32fa81fdc

7 years agolayers: Add VkObjectType conversion
Mark Young [Tue, 30 May 2017 20:53:50 +0000 (14:53 -0600)]
layers: Add VkObjectType conversion

Add conversion from VulkanObjectType internal enum to the
VkObjectType core enumeration.

Change-Id: I17158722faffaf088e07219a5bf596ee02d2338e

7 years agobuild: Speed up AppVeyor builds.
Karl Schultz [Fri, 26 May 2017 22:57:28 +0000 (16:57 -0600)]
build: Speed up AppVeyor builds.

- Build only VS 2015
- Cache the external directory

7 years agotests: Split up ImageLayerViewTests
Chris Forbes [Fri, 26 May 2017 23:34:54 +0000 (16:34 -0700)]
tests: Split up ImageLayerViewTests

This test name didn't come close to describing what it was trying to do.
Split into focused tests that cover each case of CreateImageView.

7 years agotests: Remove problematical KHR_mnt1 check
Dave Houlton [Tue, 30 May 2017 16:50:33 +0000 (10:50 -0600)]
tests: Remove problematical KHR_mnt1 check

Remove KHR_Maintenance1 check and conditional code from test
CopyImageTypeExtentMismatch(). Disable two clauses that are
specific to the extension, for the time being. Update the VU
database to replace missing test names.

Change-Id: I0c1442b943c3ed8a105b771868946ae68e543b50

7 years agolayers: gh1649 - Fix clang warning
Mark Young [Wed, 5 Apr 2017 21:58:44 +0000 (15:58 -0600)]
layers: gh1649 - Fix clang warning

The function pointer definition for the Physical device extensions
was incorrect.  Updated to work properly and remove clang warning.

This was also causing an issue with Tony's latest test.

Change-Id: Ibdd19754a4394d1b88d3a20268238baaf3ec0907

7 years agoexternal: Update external revisions
Jeremy Hayes [Tue, 30 May 2017 15:50:33 +0000 (09:50 -0600)]
external: Update external revisions

Change-Id: Ie168ac55cc12d317a2c189dbaee735718b295c04

7 years agoloader: Fix env usage and cleanup messages
Mark Young [Fri, 26 May 2017 20:39:54 +0000 (14:39 -0600)]
loader: Fix env usage and cleanup messages

Fix the environment variable usage of VK_LOADER_DISABLE_INST_EXT_FILTER
so that it will also ignore the unknown extensions during
vkCreateInstance and clean up a few more messages.
The previous messages were confusing and didn't indicate what
was actually wrong.

Change-Id: Iccd0a4b2cfd673187cb7e92fe9cec23deb058ff2

7 years agoloader: Extend emulation to VkDevice creation
Lenny Komow [Wed, 24 May 2017 21:47:15 +0000 (15:47 -0600)]
loader: Extend emulation to VkDevice creation

Add support for VkPhysicalDeviceFeatures2KHR and
VkDeviceGroupDeviceCreateInfoKHX structs in the pNext chain
of VkDeviceCreateInfo for emulated physical devices

Change-Id: Ib00e35546f064f57f987d8eda14fba17bceab52c

7 years agoloader: Add additional extensions to ext emulation
Lenny Komow [Tue, 23 May 2017 21:18:21 +0000 (15:18 -0600)]
loader: Add additional extensions to ext emulation

The loader will now handle structures from VK_KHX_multiview and
VK_KHX_external_memory_capabilities in the pNext fields of commands
from VK_KHR_get_physical_device_properties2.

Change-Id: Ic7175e9334c56c7642b75360b35a6b9ff240ee98

7 years agolayers: Add new exts to device_extensions hdr
Mark Lobodzinski [Thu, 25 May 2017 22:22:48 +0000 (16:22 -0600)]
layers: Add new exts to device_extensions hdr

Change-Id: Iddaf6cda599d3d98f678f74fd206cf6b670a275f

7 years agolayers: Add tracking of VkDescriptorUpdateTemplateKHR
Mark Young [Thu, 25 May 2017 19:54:31 +0000 (13:54 -0600)]
layers: Add tracking of VkDescriptorUpdateTemplateKHR

Add tracking of the new VkDescriptorUpdateTemplateKHR handle.

Also, update to include proper VUIDs for the corresponding checks
in object_tracker.cpp with help from Mark L and Mike S.

Change-Id: I4a665cfa2e8b4d8faf2a0ebd583c759e399b1599

7 years agoscripts:Fix doc validation for 8-col DB
Tobin Ehlis [Thu, 25 May 2017 20:55:42 +0000 (14:55 -0600)]
scripts:Fix doc validation for 8-col DB

Update doc validation to read in the new VUID string and core|ext
columns of the vk_validation_error_database.txt.

7 years agotests: Fix test names in database
Tony Barbour [Thu, 25 May 2017 19:50:43 +0000 (13:50 -0600)]
tests: Fix test names in database

Change-Id: Ib96edb3a15a8496040c7ccb0db019ccbd92e94e7

7 years agoexternal: update external revision for glslang
Jeremy Hayes [Thu, 25 May 2017 15:53:25 +0000 (09:53 -0600)]
external: update external revision for glslang

Pick up a fix for built-in redeclarations.

Change-Id: I2b506e24b2cf619b07ff1c75ab0a9a05143379ca

7 years agolayers:Pipe in disable for shader validation
Tobin Ehlis [Wed, 24 May 2017 22:58:48 +0000 (16:58 -0600)]
layers:Pipe in disable for shader validation

Allow VK_VALIDATION_CHECK_SHADERS_EXT enum to disable the spirv-tools-
based shader validation in core_validation.

There were a few other pieces of internal shader validation and
tracking that were tied to the shader_validation bit but I re-enabled
those bits for now as we lose the active descriptor binding tracking if
those features are disabled. That would lead to a various other
features that need to be disabled to avoid crashes. Specifically the
connection between command buffers and active samplers, buffer, images
that are present in descriptor sets.

To test this I ran layer_validation_tests with the shaders disabled
and most tests work fine with only the ones testing internal shader
validation pieces failing as expected.

7 years agoscripts:Remove cruft from spec.py script
Tobin Ehlis [Wed, 24 May 2017 20:13:46 +0000 (14:13 -0600)]
scripts:Remove cruft from spec.py script

Kill a bunch of old stuff from spec.py now that we can use json file
for updating/tracking the VUIDs.

Update the error DB & header to be sorted by the new IDs.

Also add step to VU txt parsing to remove any backslashes which will
break compilation of vk_validation_error_messages.h.

7 years agolayers: Add PVRTC formats to format utils
Dave Houlton [Tue, 23 May 2017 22:16:54 +0000 (16:16 -0600)]
layers: Add PVRTC formats to format utils

Update vk_format_utils to classify PVRTC formats correctly.

Change-Id: Ie48883885725a28d62dbafa66151971e0f33a45e

7 years agolayers:Migrate to new validation error IDs
Tobin Ehlis [Wed, 24 May 2017 15:31:13 +0000 (09:31 -0600)]
layers:Migrate to new validation error IDs

Migrate valid usage IDs to new numbers based on the string IDs that are
integrated into the spec build process.

The formula for mapping the string ID to the new VALIDATION_ERROR enum
value is in vuid_mapping.py script.
The mapping between the old IDs and the new IDs is in the file
"old_vuid_to_new_mapping.txt."

The vk_validation_error_database.txt file has the new IDs as well as
the string-based ID for each element and a column indicating if the
valid usage is in the core spec or if it requires extension(s) and is
therefore in the extension spec.

The error messages were shortened and no longer include a section
reference. Now the link goes directly to the line in the spec where
the valid usage text occurs. The base of the spec link is the core spec
unless the VU requires an extension in which case the spec with all
extensions is used as the base.

7 years agoscripts:Add core/ext column to error database
Tobin Ehlis [Tue, 23 May 2017 21:23:40 +0000 (15:23 -0600)]
scripts:Add core/ext column to error database

Update the validation error database to have a column that indicates if
any extensions are required for a given VU to be valid. If an extension
is required then the spec link will point into the spec with all
extensions, otherwise the core spec will be linked.

7 years agoscripts:Add string-based VUID to db file
Tobin Ehlis [Fri, 19 May 2017 22:32:15 +0000 (16:32 -0600)]
scripts:Add string-based VUID to db file

Include the new, string-based Valid Usage Unique IDs in the validation
database file. This will be use to map between the old ids and these
new ids.

These script updates are a bit hacky as the migration is underway and
function is being favored over form. Once migration is complete I can
strip down spec.py script to core functionality which should be much
cleaner and simpler than either the original code or this current form.

7 years agoscripts:Preparing to migrate VUIDs
Tobin Ehlis [Thu, 11 May 2017 20:42:38 +0000 (14:42 -0600)]
scripts:Preparing to migrate VUIDs

Initial changes to spec.py in order to parse json file of VUs
and convert string-based VUs into unique integer IDs that will be
used for the enum values.

Still need to get a clean json file and parse all of the VUs to
confirm that they're unique. Once that's done the actual conversion
will be a separate step.

The VUID string to unique ID mapping code is in vuid_mapping.py.
This includes tables for mapping from api/struct/param names to unique
ids and the convertVUID() function that takes a string and maps it to a
uniqueID.

7 years agoloader: Fix extension surface params
Lenny Komow [Mon, 22 May 2017 22:17:05 +0000 (16:17 -0600)]
loader: Fix extension surface params

Change-Id: I310d6d356b5c9377ff8285ee123def989e95b142

7 years agoexternal: update external revisions
Jeremy Hayes [Mon, 22 May 2017 18:53:21 +0000 (12:53 -0600)]
external: update external revisions

Update external revisions for glslang, spirv-tools, spirv-headers, and
shaderc.

Change-Id: Ie1f4afe2d36a6d8e3d1e166c23372f8f6523cf59

7 years agotests: use built-in gl_Position
Jeremy Hayes [Mon, 22 May 2017 22:31:30 +0000 (16:31 -0600)]
tests: use built-in gl_Position

This change is required for upcoming revision of glslang, which requires
location on input/outputs but which does not allow location on
built-ins.

Change-Id: I9ba8989e5ac69bf422e16d4e7ffc7d33b9f71760

7 years agoheader: Update to 1.0.50 Vulkan version
Mark Lobodzinski [Mon, 22 May 2017 16:10:07 +0000 (10:10 -0600)]
header: Update to 1.0.50 Vulkan version

- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- build new verison of vulkan.hpp
- code fixups for deprecated DebugReportError enum

Note that this does NOT include any shader-checker support for the
VK_AMD_texture_gather_bias_lod extension, as this requires glslang
and SPIR-V updates.

Change-Id: Ie01aed143f2fad065c86e2a27e46fe32ccb9e1f7

7 years agoscripts:Update Validation IDs for spec 1.0.50
Tobin Ehlis [Mon, 22 May 2017 16:56:39 +0000 (10:56 -0600)]
scripts:Update Validation IDs for spec 1.0.50

I'm attempting to migrate to the new VUIDs that are integrated into the
spec this week so this will hopefully be the last update of this type.

Migration plan is:
-Update existing VUID database to include new, integrated, string VUIDs
-Update VUID db to include core/ext data from json
-Update links/messages in VUIDs
-Move all old VUIDs in the source to use new VUIDs

Command to perform this current update was:
python spec.py -update -remap 3076-2049,2

And I manually restored 911 & 912 which are in the core spec but not in
the extension spec.

7 years agoandroid: Update gradle layer build to use cmake
guanghuafan [Fri, 28 Apr 2017 19:02:24 +0000 (12:02 -0700)]
android: Update gradle layer build to use cmake

7 years agoloader: Use correct instance in gpdpa call
Tony Barbour [Wed, 17 May 2017 18:17:18 +0000 (12:17 -0600)]
loader: Use correct instance in gpdpa call

Change-Id: I662a6a182680ef7da6ad51a738fcc5aaff54f043

7 years agolayers: Fix layers check in CmdClearAttachments
Dave Houlton [Mon, 22 May 2017 22:16:27 +0000 (16:16 -0600)]
layers: Fix layers check in CmdClearAttachments

Fix the layer count check in PreCallValidateCmdClearAttachments()
to compare against the view's layers, rather than against the
underlying image's layers. Update test CmdClearAttachmentTests
to provoke both clauses of the test condition.

Change-Id: I96d9440cbed3a290554410bb0574e6c443190a64

7 years agolayers: Add S8_UINT to FormatIsUINT() helper
Dave Houlton [Mon, 22 May 2017 19:52:20 +0000 (13:52 -0600)]
layers: Add S8_UINT to FormatIsUINT() helper

Fixed an oversight in FormatIsUINT() helper function, add VK_FORMAT_S8_UINT
to the list.

Change-Id: Ie01c2dbd1db7cdae1a4939543c00aa7b32ae31ff

7 years agotests: Add CopyImage tests
Dave Houlton [Wed, 10 May 2017 00:00:46 +0000 (18:00 -0600)]
tests: Add CopyImage tests

Add CopyImageTypeExtentMismatch test.
Add CopyImageCompressedBlockAlignment test.
Update VU database.

Change-Id: I1d9948e9415da99f955cb6300f309bf5954144c8

7 years agolayers: Add VU checks to CmdCopyImage
Dave Houlton [Tue, 2 May 2017 23:15:13 +0000 (17:15 -0600)]
layers: Add VU checks to CmdCopyImage

Added 16 image copy checks called from PreCallValidateCmdCopyImage()
in buffer_validation.cpp. VUs 1209-1217, 1742-1745, and 2603-2604.

Change-Id: I5f63862a4451458b054c4b10cd218293d9e16289

7 years agodocs: Update docs with env vars
Mark Young [Thu, 18 May 2017 20:52:14 +0000 (14:52 -0600)]
docs: Update docs with env vars

Added table of all environmental variables.  Also added note
about using LD_BIND_NOW usage for discovering problematic ICDs.

Change-Id: Iba4234b2226ab145491fc913f4361b098b21fd0b

7 years agoloader: gh1771-Fix realloc handling
Mark Young [Fri, 19 May 2017 18:29:43 +0000 (12:29 -0600)]
loader: gh1771-Fix realloc handling

Fix how the loader handles realloc calls.  Instead of always overriding
the pointer, check to see if the allocation succeeds.

Also, set the paths in our run_all_tests.ps1 to global paths.

Finally, fix a spelling error in the test names.

Change-Id: I7b2e0d246dbe6353d29fb56367397c5d8767aaa2

7 years agolayers: is_extension_added_token(VK_*_MAX_ENUM) returns false
Cort Stratton [Tue, 16 May 2017 14:38:35 +0000 (07:38 -0700)]
layers: is_extension_added_token(VK_*_MAX_ENUM) returns false

Also implemented the VkSamplerAddressMode variant in terms of the generic
variant, and added a test to make sure that path is covered.

7 years agolayers: GH1632, Remove excess pClearValues warning
Mark Lobodzinski [Fri, 19 May 2017 16:50:41 +0000 (10:50 -0600)]
layers: GH1632, Remove excess pClearValues warning

Consensus was that this warning was not helpful enough to overcome
the noise it caused. Removed the check from CV and the corresponding
test.

Change-Id: I03ad08b0911a810b2333273bf4594129efa5bae5

7 years agoscripts:Update VUIDs
Tobin Ehlis [Fri, 19 May 2017 16:26:24 +0000 (10:26 -0600)]
scripts:Update VUIDs

Some valid usage statements had sub-bullets but this was recently
updated so all VUs are on their own line. Updating the VUIDs so that
they align with the new text.

7 years agoscripts:Correctly parse offline spec w/ Soup
Tobin Ehlis [Fri, 19 May 2017 14:24:04 +0000 (08:24 -0600)]
scripts:Correctly parse offline spec w/ Soup

7 years agolayers: GH1752, Update ImageSubrange checks
Petr Kraus [Thu, 18 May 2017 01:38:41 +0000 (03:38 +0200)]
layers: GH1752, Update ImageSubrange checks

- fix #1752
- handle possible overflow of `level`+`count`
- include correct err code in msges
- update and add some tests

7 years agolayers: Cascade invalidation to primary command buffer(s)
Chris Forbes [Thu, 18 May 2017 23:27:17 +0000 (16:27 -0700)]
layers: Cascade invalidation to primary command buffer(s)

7 years agolayers: Fix CmdExecuteCommands simultaneous case
Chris Forbes [Thu, 18 May 2017 23:04:50 +0000 (16:04 -0700)]
layers: Fix CmdExecuteCommands simultaneous case

7 years agotests: Finalize tests for rerecorded case
Chris Forbes [Thu, 18 May 2017 23:01:20 +0000 (16:01 -0700)]
tests: Finalize tests for rerecorded case

7 years agolayers: Track linked command buffers in both directions
Chris Forbes [Thu, 18 May 2017 22:52:12 +0000 (15:52 -0700)]
layers: Track linked command buffers in both directions

This is required for us to do proper invalidation.

7 years agotests: Tease apart SimultaneousUse test
Chris Forbes [Thu, 18 May 2017 21:34:05 +0000 (14:34 -0700)]
tests: Tease apart SimultaneousUse test

Split the two individaul cases up, and write them clearly. Add a
third for the edge case of the one CmdExecuteCommands call including the
same non-simultaneous CB twice.

7 years agoConvert primary->secondary command buffer links to GLOBAL_CB_NODE
Chris Forbes [Thu, 18 May 2017 19:30:31 +0000 (12:30 -0700)]
Convert primary->secondary command buffer links to GLOBAL_CB_NODE

This allows some simplification down the line

7 years agolayers: Remove globalInFlightCommandBuffers
Chris Forbes [Thu, 18 May 2017 18:42:53 +0000 (11:42 -0700)]
layers: Remove globalInFlightCommandBuffers

7 years agolayers: Add NotTestable to the ...stats.py script
Dave Houlton [Thu, 18 May 2017 21:56:22 +0000 (15:56 -0600)]
layers: Add NotTestable to the ...stats.py script

Change-Id: I06befac273829cf54c1ba113be31da9ba3fee190

7 years agoloader: Revert ICD dlopen back to using RTLD_LAZY
Lenny Komow [Thu, 18 May 2017 20:02:26 +0000 (14:02 -0600)]
loader: Revert ICD dlopen back to using RTLD_LAZY

Change-Id: I53ae66929ed38d81eb52cc0307341d5c8f97cdc8

7 years agolayers: Add NotTestable as a valid testname entry
Dave Houlton [Wed, 17 May 2017 19:25:53 +0000 (13:25 -0600)]
layers: Add NotTestable as a valid testname entry

Modify spec.py to add the keyword NotTestable as a valid test name.
Use for VU checks that are implemented but which have no reasonable
method of testing.

Change-Id: Icd91e91b7c85484a8c652f970edc55d978829d81

7 years agolayers: Kill assert for NULL pInheritanceInfo->FB
Mark Lobodzinski [Thu, 18 May 2017 18:02:34 +0000 (12:02 -0600)]
layers: Kill assert for NULL pInheritanceInfo->FB

It is perfectly acceptable for the FB member of this structure
to be NULL. Remove assert.

Change-Id: I22b207bc6d96e1bb4b7c5f71a8dd796da6639642

7 years agotests: Added tests for unrecorded prim/sec CBs
Mark Lobodzinski [Tue, 16 May 2017 15:17:51 +0000 (09:17 -0600)]
tests: Added tests for unrecorded prim/sec CBs

Also updated error DB with new test name (ExecuteUnrecordedCBs).

Change-Id: I5bb65b9a9b6bf93cbca5eceb66b2c7f7937ea313

7 years agolayers: GH1756, Fix null pInteritanceInfo deref
Mark Lobodzinski [Tue, 16 May 2017 15:14:35 +0000 (09:14 -0600)]
layers: GH1756, Fix null pInteritanceInfo deref

Trying to execute an unrecorded secondary command buffer in an
active renderpass resulted in a nullptr dereference. Added null check
along with a warning for unrecorded command buffers.

Change-Id: I67f34da57a9eda422f2321ddc6f28b863c999f5b

7 years agolayers: Record results from ext surface queries
Mike Schuchardt [Wed, 17 May 2017 13:54:02 +0000 (07:54 -0600)]
layers: Record results from ext surface queries

Update core validation to save the results of
vkGetPhysicalDeviceSurfaceCapabilities2KHR,
vkGetPhysicalDeviceSurfaceCapabilities2EXT, and
vkGetPhysicalDeviceSurfaceFormats2KHR so they can be used to validate
swapchain creation.

Change-Id: Iea112df509a35d9bf606b35d4da8d680ae0d76a6

7 years agolayers: Validate shared presentable image cases
Tobin Ehlis [Thu, 11 May 2017 14:52:51 +0000 (08:52 -0600)]
layers: Validate shared presentable image cases

Add validation support for shared presentable images as defined in
VK_KHR_shared_presentable_image extension.

For all uses of shared presentable images, make sure that the image is
appropriately in VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout.
For two cases where no layout validation was performed, added a TODO
note (vkCmdBlitImage, vkCmdResolveImage) as basic layout validation
should first be added upstream.
Also locked the layout in the case where a front-buffered image is
presented and then flag an error if an attempt is made to transition
the image layout after that point.

Change-Id: I06cda727e3a7f56ccff4bffd7503b5ff73e8a795

7 years agolayers: Add VUIDs to new objecttracker checks
Mark Lobodzinski [Mon, 15 May 2017 21:55:28 +0000 (15:55 -0600)]
layers: Add VUIDs to new objecttracker checks

Change-Id: I0d2d893b68aea7df294796cf42a8c6d46fbfd441

7 years agolayers: Transition all to HandleToUint64
Petr Kraus [Sun, 14 May 2017 21:43:38 +0000 (23:43 +0200)]
layers: Transition all to HandleToUint64

Mostly automatic (i.e. probably missed some cases)

7 years agolayers: Add handle to uint64 helper
Petr Kraus [Sat, 13 May 2017 18:53:12 +0000 (20:53 +0200)]
layers: Add handle to uint64 helper

7 years agolayers: Remove CV imageToSwapchainMap
Chris Forbes [Thu, 11 May 2017 17:51:26 +0000 (10:51 -0700)]
layers: Remove CV imageToSwapchainMap

This no longer served any purpose, and entries were never cleaned up
when swapchains were destroyed.

7 years agolayers: Remove swapchain image special case from ValidateBarriers
Chris Forbes [Thu, 11 May 2017 17:37:24 +0000 (10:37 -0700)]
layers: Remove swapchain image special case from ValidateBarriers

Swapchain images have been added to the images table for a long time.
The checks below were also inconsistent about using the extracted data
or just going to image_data.

7 years agolayers: Fix swapchain acquired validation msgs
Mark Lobodzinski [Wed, 17 May 2017 15:16:48 +0000 (09:16 -0600)]
layers: Fix swapchain acquired validation msgs

Running cube --validate generated erroneous validation messages saying
the swapchain images had not been correctly acquired. Fixed bug in the
shared_presentable_images support code.

Change-Id: I1a8adc38902bdf1b517fd4da8e0be55465d55e12

7 years agolayers: Add basic support for new extension
Mark Lobodzinski [Tue, 16 May 2017 20:42:25 +0000 (14:42 -0600)]
layers: Add basic support for new extension

Add basic validation support for KHR_shared_presentable_image.

Change-Id: If6cc5abe6b41ed8580fc89bcf7c8103af971abc9

7 years agolayers: Validate shared presentable image cases
Tobin Ehlis [Thu, 11 May 2017 14:52:51 +0000 (08:52 -0600)]
layers: Validate shared presentable image cases

Add validation support for shared presentable images as defined in
VK_KHR_shared_presentable_image extension.

For all uses of shared presentable images, make sure that the image is
appropriately in VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout.
For two cases where no layout validation was performed, added a TODO
note (vkCmdBlitImage, vkCmdResolveImage) as basic layout validation
should first be added upstream.
Also locked the layout in the case where a front-buffered image is
presented and then flag an error if an attempt is made to transition
the image layout after that point.

Change-Id: I06cda727e3a7f56ccff4bffd7503b5ff73e8a795

7 years agoloader: Expand error message info
Mark Young [Tue, 16 May 2017 15:48:55 +0000 (09:48 -0600)]
loader: Expand error message info

Expand loader_platform_open_library_error on Windows to include
the error message from GetLastError();

Also, modify the loading of the layer library to use the
loader_platform_open_library_error message sincce we want
to get as much error information in that as possible.

And fix a typo in a comment.

Change-Id: I1ef5ede8c6716c4624b31ddb3b32b83392920a6c

7 years agoloader: Expand lib search locations
Mark Young [Tue, 16 May 2017 13:03:56 +0000 (07:03 -0600)]
loader: Expand lib search locations

Expand library search locations based on recommendations by
Dustin.  We still attempt to use the old LoadLibrary first,
and then, only if that fails, do we attempt to use the new search.

Change-Id: I4cf1358f9eb7e45ac61f36435e926aa89c212f83

7 years agoloader: Modify ICD dlopen to use RTLD_NOW
Mark Young [Tue, 16 May 2017 03:35:47 +0000 (21:35 -0600)]
loader: Modify ICD dlopen to use RTLD_NOW

Pierre-Loup at Valve caught this.  By using RTLD_NOW on dlopen
it fails if symbols are not resolved at dlopen time.  This resolves
an error where an ICD is missing a symbol on a system causing
the loader to fail later at an unrecoverable time.

Change-Id: Icf43fd36aebfbcb4b08e7e3891570161234118f7

7 years agoexternal: Update refs for glslang and spirv-tools
Mike Weiblen [Mon, 15 May 2017 21:33:46 +0000 (15:33 -0600)]
external: Update refs for glslang and spirv-tools

Change-Id: Iaf28f3b22c53d8272984e7369fb5afb606908bdd

7 years agolayers: Add VUIDs to new objecttracker checks
Mark Lobodzinski [Mon, 15 May 2017 21:55:28 +0000 (15:55 -0600)]
layers: Add VUIDs to new objecttracker checks

Change-Id: I0d2d893b68aea7df294796cf42a8c6d46fbfd441

7 years agolayers: Update ObjectTracker for new extensions
Mark Lobodzinski [Mon, 15 May 2017 19:17:18 +0000 (13:17 -0600)]
layers: Update ObjectTracker for new extensions

vkGetPhysicalDeviceSurfaceFormats2KHR, vkGetSwapchainStatusKHR, and
vkGetPhysicalDeviceSurfaceCapabilities2KHR.

Change-Id: I726880924300e06209013ae39a8c4e019d4c2266

7 years agoheader: Update to 1.0.49 Vulkan version
Mark Lobodzinski [Mon, 15 May 2017 16:27:52 +0000 (10:27 -0600)]
header: Update to 1.0.49 Vulkan version

- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- updated vulkan.hpp -- NOTE: includes workaround for mishandled
                              extension API
- updated parameter validation layer with new APIs

Change-Id: I0b65065e1a0355c18c4a5eafdb0b3d218af6ff91

7 years agoscripts:Updated Validation IDs for spec 1.0.49
Tobin Ehlis [Mon, 15 May 2017 19:18:19 +0000 (13:18 -0600)]
scripts:Updated Validation IDs for spec 1.0.49

This may be the last one of these updates. String-based VUIDs are
now integrated into the spec so I'll migrate to a system based on those
in the next week.

Command to perform update:
python spec.py -update -remap 1631-1086:1734-1180:1739-1183:
1799-1234:3289-1251:182-1696,2:185-1699,3:2844-2336:660-2816:
2920-1964

I also manually restored 911 & 912 which are only in the Core spec.

7 years agoloader: Add ICD to extension emulation debug info
Lenny Komow [Mon, 15 May 2017 19:05:33 +0000 (13:05 -0600)]
loader: Add ICD to extension emulation debug info

Change-Id: I5ad4e0794726029fe7fe21fdb8a9667f7eb9e7d5

7 years agodemos: gh1747 - Check for the installed libvulkan.so.1
Timo Aaltonen [Tue, 9 May 2017 11:39:31 +0000 (14:39 +0300)]
demos: gh1747 - Check for the installed libvulkan.so.1

avoids depending on the development symlink

v2: Android doesn't have versioned libs, so don't touch ShellAndroid.cpp

7 years agodocs: Contributing.md updates
Mark Lobodzinski [Thu, 11 May 2017 19:54:52 +0000 (13:54 -0600)]
docs: Contributing.md updates

Change-Id: I0253ecd6166d84188f4f1cc1523c8e87d46c8590