platform/upstream/Vulkan-LoaderAndValidationLayers.git
7 years agobuild: Improve cygwin build support
Jeff Juliano [Sat, 26 Aug 2017 12:20:51 +0000 (08:20 -0400)]
build: Improve cygwin build support

Partially support cygwin environment by adding --no-build to
update_external_sources.sh

Change-Id: I9fa35d6c720dd05a11c307d3da4d09415934899e

7 years agotests: Fix some LVL tests
Jeremy Kniager [Mon, 21 Aug 2017 21:21:24 +0000 (15:21 -0600)]
tests: Fix some LVL tests

Change-Id: I083f6c0d02b94589852d55aefc531908d152a5d7

7 years agobuild: Add missing quotes
Jeff Juliano [Sat, 26 Aug 2017 12:28:57 +0000 (08:28 -0400)]
build: Add missing quotes

Change-Id: Icff4a71bbedc3ee95d2dc2b85224a3c2eee74cb6

7 years agoscripts: PV codegen handle multiple requires
Mike Schuchardt [Thu, 24 Aug 2017 21:15:02 +0000 (15:15 -0600)]
scripts: PV codegen handle multiple requires

Modify parameter validation codegen to handle multiple require blocks in
an extension, each with additional extension dependencies.

Change-Id: I336569ca19808f3dca342eb65fd076599c4fb329

7 years agolayers: use unique_ptr for pipeline map
Chris Forbes [Fri, 25 Aug 2017 16:32:34 +0000 (09:32 -0700)]
layers: use unique_ptr for pipeline map

7 years agoLoader: Fix out-of-memory handling in loaderGetDeviceRegistryFiles
Slawomir Cygan [Fri, 25 Aug 2017 08:54:03 +0000 (10:54 +0200)]
Loader: Fix out-of-memory handling in loaderGetDeviceRegistryFiles

Wrongly handled OOM error causes
dEQP-VK.api.object_management.alloc_callback_fail test to fail, because wrong
error code is returned.

7 years agolayers: Fix crash in CreateGraphicsPipelines reading from moved-from ptr
Chris Forbes [Fri, 25 Aug 2017 18:21:19 +0000 (11:21 -0700)]
layers: Fix crash in CreateGraphicsPipelines reading from moved-from ptr

7 years agoRevert "Revert "layers: unique_ptr for temp compute pipelines""
Chris Forbes [Fri, 25 Aug 2017 18:19:44 +0000 (11:19 -0700)]
Revert "Revert "layers: unique_ptr for temp compute pipelines""

This reverts commit 615dc4e3ea0495bc28130377b9e637e9979a560e.

7 years agoRevert "Revert "layers: Introduce some unique_ptr into pipeline creation""
Chris Forbes [Fri, 25 Aug 2017 18:19:39 +0000 (11:19 -0700)]
Revert "Revert "layers: Introduce some unique_ptr into pipeline creation""

This reverts commit 5d6aaa553b634747fb2761c6e5b665bdae54d206.

7 years agoRevert "layers: Introduce some unique_ptr into pipeline creation"
Chris Forbes [Fri, 25 Aug 2017 16:37:35 +0000 (09:37 -0700)]
Revert "layers: Introduce some unique_ptr into pipeline creation"

This reverts commit 7d35703bdc03d94cad272b5ea3ede8d586f57e88.

7 years agoRevert "layers: unique_ptr for temp compute pipelines"
Chris Forbes [Fri, 25 Aug 2017 16:37:28 +0000 (09:37 -0700)]
Revert "layers: unique_ptr for temp compute pipelines"

This reverts commit cfc1ed15584a12ef62e113c8daf673c6a68ce29c.

7 years agolayers: unique_ptr for temp compute pipelines
Chris Forbes [Fri, 25 Aug 2017 16:16:00 +0000 (09:16 -0700)]
layers: unique_ptr for temp compute pipelines

7 years agolayers: Introduce some unique_ptr into pipeline creation
Chris Forbes [Thu, 24 Aug 2017 22:45:08 +0000 (15:45 -0700)]
layers: Introduce some unique_ptr into pipeline creation

7 years agoscripts: Enable instance extension checks in PV
Mark Lobodzinski [Wed, 23 Aug 2017 21:23:23 +0000 (15:23 -0600)]
scripts: Enable instance extension checks in PV

Parameter_validation's hammer for excluding some pdev-ish checks was
too large.  This adds extension dependency checks for about 50 more
APIs.

Change-Id: Icb44cdb36c8c0384781e04e207ceb18d9f67ff0c

7 years agoheader: Update to version 1.0.59 of the vulkan hdr
Mark Lobodzinski [Mon, 21 Aug 2017 16:34:38 +0000 (10:34 -0600)]
header: Update to version 1.0.59 of the vulkan hdr

- updated vulkan.h
- updated vk.xml
- updated Win/Lin json files
- rebuilt and updated vulkan.hpp
- updated vk_validation_error_database.txt
- updated vk_validation_error_messages.h
- added new code-generated VUIDs (16) to error database
- modified object tracker for VUID corner-case
- updated vulkaninfo.c for STYPE name change

Change-Id: I0870e8bc4e84867e05bd466c13c7428b9b7365ac

7 years agolayers: Use correct data layer in vkCreateInstance in param validation
Gabríel Arthúr Pétursson [Sat, 19 Aug 2017 16:44:45 +0000 (16:44 +0000)]
layers: Use correct data layer in vkCreateInstance in param validation

7 years agotests:clang-format fix-up
Tobin Ehlis [Tue, 22 Aug 2017 21:50:30 +0000 (15:50 -0600)]
tests:clang-format fix-up

7 years agolayers:Remove disturbed descriptor perf warning
Tobin Ehlis [Tue, 22 Aug 2017 19:11:23 +0000 (13:11 -0600)]
layers:Remove disturbed descriptor perf warning

Fixes #2020

Support from devs to remove this perf warning so just killing it.
Added a comment for future work where we can track which descriptors
are disturbed and reference that if a user attempts to use a
disturbed descriptor that isn't bound.

Also commented out associated test and filed #2022 to track enhancement
making note of disturbed descriptors if used unbound.

7 years agolayers: Fix memory leaks in functions
Jeremy Kniager [Wed, 16 Aug 2017 20:57:42 +0000 (14:57 -0600)]
layers: Fix memory leaks in functions

Change-Id: I8e25adabefde3a04be5536ce4c5c2d5920a76140

7 years agovkjson: Add support for Android
Cody Northrop [Wed, 16 Aug 2017 23:38:15 +0000 (17:38 -0600)]
vkjson: Add support for Android

This commit adds vkjson and vkjson_info to the Android build.
It is only generated as an executable for devices with root
access, but it could be expanded to an APK with some more
boilerplate work.

See updates to BUILD.md for how to build and run on the device.

7 years agolayers: Wire up static_status check for CmdSetScissor
Chris Forbes [Wed, 16 Aug 2017 20:29:41 +0000 (13:29 -0700)]
layers: Wire up static_status check for CmdSetScissor

7 years agolayers: Wire up static_status check for CmdSetViewport
Chris Forbes [Wed, 16 Aug 2017 20:26:00 +0000 (13:26 -0700)]
layers: Wire up static_status check for CmdSetViewport

7 years agolayers: Drop error for binding compute pipeline inside renderpass
Chris Forbes [Wed, 16 Aug 2017 20:18:37 +0000 (13:18 -0700)]
layers: Drop error for binding compute pipeline inside renderpass

It's perfectly valid to bind the compute pipeline inside a renderpass.
An application only may not /dispatch/ compute work inside a
renderpass.

7 years agolayers: Drop out some redundant checks already covered by OT
Chris Forbes [Wed, 16 Aug 2017 20:16:31 +0000 (13:16 -0700)]
layers: Drop out some redundant checks already covered by OT

7 years agolayers: Calculate viewport/scissor state bits correctly
Chris Forbes [Wed, 16 Aug 2017 19:58:48 +0000 (12:58 -0700)]
layers: Calculate viewport/scissor state bits correctly

7 years agolayers: (re)-add viewport and scissor cbstatus flags
Chris Forbes [Wed, 16 Aug 2017 19:56:01 +0000 (12:56 -0700)]
layers: (re)-add viewport and scissor cbstatus flags

We won't actually check these at draw time since we have more precise
per-viewport and per-scissor support there, but we need these in order
to easily reject CmdSetViewport/CmdSetScissor when the pipeline doesn't
have the appropriate dynamic state enabled.

7 years agoandroid: Updates for NDK r15
Cody Northrop [Wed, 16 Aug 2017 19:25:22 +0000 (13:25 -0600)]
android: Updates for NDK r15

Removes app_dummy from apps that use native activity.

For more details refer to: https://github.com/android-ndk/ndk/issues/381

7 years agotests:Check for D24_S8_UINT format support
Tobin Ehlis [Wed, 16 Aug 2017 17:14:07 +0000 (11:14 -0600)]
tests:Check for D24_S8_UINT format support

Update CreateImageViewFormatFeatureMismatch test to make sure that the
desired DS format is supported before testing.

7 years agolayers: Fix img layout state in CmdExecuteCommands
Alex Smith [Wed, 16 Aug 2017 08:23:27 +0000 (09:23 +0100)]
layers: Fix img layout state in CmdExecuteCommands

Previously the layout state in the primary command buffer was just
overwritten with the state in the secondary command buffer.

This can lead to spurious errors upon submission of the primary CB, if
an image used in the secondary CB is used prior to CmdExecuteCommands
in the primary CB with a different initial layout. This is because the
initialLayout field for the image on the primary CB is overwritten
with that of the secondary CB.

An example case that was incorrectly erroring (these commands refer to
the same image, newly created):

  (primary buffer)
  vkCmdPipelineBarrier, transition UNDEFINED -> TRANSFER_DST_OPTIMAL
  vkCmdExecuteCommands
    (secondary buffer)
    ...
    vkCmdCopyBufferToImage, layout TRANSFER_DST_OPTIMAL

Just before the CmdExecuteCommands, the image had initialLayout =
UNDEFINED and layout = TRANSFER_DST_OPTIMAL on the primary CB, and
initialLayout = layout = TRANSFER_DST_OPTIMAL on the secondary.

After CmdExecuteCommands, the primary CB state is overwritten, so
it has initialLayout = layout = TRANSFER_DST_OPTIMAL. At submission,
this then errors because the global image layout is UNDEFINED.

Fix by only setting initialLayout on the primary CB from the secondary
if the image hasn't already been used on the primary.

Change-Id: Iae248ed09b1f87598fd192ba3d6f0bcf7ad38ada

7 years agolayers: Copy queue submit fcns in CmdExecuteCommands
Alex Smith [Wed, 16 Aug 2017 08:17:54 +0000 (09:17 +0100)]
layers: Copy queue submit fcns in CmdExecuteCommands

When a secondary command buffer is executed, copy all functions in its
queue_submit_functions list to the primary command buffer.

This is needed e.g. to ensure that functions registered to validate and
update memory validity state for a command in the secondary CB get run
upon submission of the primary CB.

Fixes spurious memory invalid warnings on later commands after an
image's memory has been initially made valid inside a secondary CB.

Change-Id: I39d5a34f074942d5dedbf4c5a0295af957a92361

7 years agolayers: Update Database to fix CI
Mark Lobodzinski [Wed, 16 Aug 2017 18:08:12 +0000 (12:08 -0600)]
layers: Update Database to fix CI

Couple of VUIDS were not added to the database.

Change-Id: I8ad8868182c8d129622d616241f5e0a14cb5054e

7 years agolayers: Check cb::static_status for most dynamic state setters
Chris Forbes [Tue, 15 Aug 2017 22:07:37 +0000 (15:07 -0700)]
layers: Check cb::static_status for most dynamic state setters

7 years agolayers: Track static state bits separately
Chris Forbes [Tue, 15 Aug 2017 21:48:50 +0000 (14:48 -0700)]
layers: Track static state bits separately

This gives us two advantages:
- We no longer need to recalculate the state bits to remove for the old
pipeline when binding a new pipeline.
- We now have the set of bits to test against when trying to bind
dynamic state for #614

7 years agolayers: Invalidate old pipeline's static state when binding
Chris Forbes [Tue, 15 Aug 2017 19:28:16 +0000 (12:28 -0700)]
layers: Invalidate old pipeline's static state when binding

Previously we'd only ever or in new bits, causing us to miss cases where
some state changes from static to dynamic within a CB.

Also only fiddle with the state masks when binding a graphics pipeline
-- previously we'd miss some other cases because binding a compute
pipeline would set all the state bits.

7 years agolayers: inline set_cb_pso_status into sole caller
Chris Forbes [Tue, 15 Aug 2017 18:23:40 +0000 (11:23 -0700)]
layers: inline set_cb_pso_status into sole caller

7 years agoSplit out dynamicstate->flags conversion
Chris Forbes [Tue, 15 Aug 2017 18:09:13 +0000 (11:09 -0700)]
Split out dynamicstate->flags conversion

7 years agolayers: Move PV custom funcptrs into map
Mark Lobodzinski [Tue, 8 Aug 2017 20:16:51 +0000 (14:16 -0600)]
layers: Move PV custom funcptrs into map

Simplifies steps necessary for new custom functions.

Change-Id: Ib2d80346ebc42011dce74fdd8cee62adb4b3432c

7 years agolayers: Re-architect parameter validation layer
Mark Lobodzinski [Tue, 1 Aug 2017 19:02:20 +0000 (13:02 -0600)]
layers: Re-architect parameter validation layer

Changed the codegen to autogenerate validation functions for any new
APIs without user intervention. Manual updates are only necessary to
extend PV functionality.

- parameter_validation.h is now checked into the layers directory
- parameter_validation.cpp is now generated
- parameter_validation_utils.cpp is new and contains any custom
      (non-generated) or housekeeping functions.
- parameter_validation_utils.h is deprecated
- updated database for new VUID coverage

Change-Id: Ib9261894386145573ba9e8906ba4ad4e9fecbdfd

7 years agolayers: Add checks for Image/ImageView usage
Jeremy Kniager [Tue, 18 Jul 2017 17:10:28 +0000 (11:10 -0600)]
layers: Add checks for Image/ImageView usage

Change-Id: Ibb2ac5b5f4b4176f5745007598c2fe64665237c2

7 years agodemos: Fix disappearing objects in smoketest
Karl Schultz [Tue, 15 Aug 2017 15:08:53 +0000 (09:08 -0600)]
demos: Fix disappearing objects in smoketest

When an object reaches the end of its "curve" path
it receives a new curve.  To ease the transition from
the old curve to the new curve, the origin of the new
curve is the ending point of the old curve.  However,
this can result in the starting point of the new curve
being out of the view.  This results in objects slowing
leaving the view.

Add code to move the origin of the new curve back inside
the original view bounds only if the end of the old curve
is out of the view bounds.  This does not add any additional
jarring because any object getting a new origin is already
outside the view anyway.

Change-Id: I50e88be453f31b9c37878f63c97d4c7c8154e718

7 years agoheader: Update to version 1.0.58 of the vulkan hdr
Mark Lobodzinski [Mon, 14 Aug 2017 21:26:30 +0000 (15:26 -0600)]
header: Update to version 1.0.58 of the vulkan hdr

- updated vulkan.h
- updated vk.xml
- updated cgenerator.py
- updated Win/Lin json files
- updated vulkan.hpp
- updated vk_validation_error_messages.h
- updated vk_validation_error_database.h

Change-Id: I8c525b6a2bd69914440c6d7984a67446b27e6c23

7 years agodemos: Add compositeAlphaFlags fix to cube.c
Tony Barbour [Mon, 14 Aug 2017 18:02:30 +0000 (12:02 -0600)]
demos: Add compositeAlphaFlags fix to cube.c

Change-Id: Id19d11e909ffc21c4aa6a419b071ba53594ae94f

7 years agodemos: cube.cpp - iterating over compositeAlphaFlags
gwizdz [Mon, 7 Aug 2017 23:17:01 +0000 (01:17 +0200)]
demos: cube.cpp - iterating over compositeAlphaFlags

Error in for loop condition

Change-Id: I8c775f961a6c05dd36e7acfdda6e94399365f90d

7 years agolayers: Fix layer settings file debug action name
Mark Lobodzinski [Thu, 10 Aug 2017 17:25:01 +0000 (11:25 -0600)]
layers: Fix layer settings file debug action name

Change-Id: Ic5a6828d57515efb50c12e21ef45e690c058c96a

7 years agolayers: GH1991, Implement BREAK debug action
Mark Lobodzinski [Thu, 10 Aug 2017 17:01:17 +0000 (11:01 -0600)]
layers: GH1991, Implement BREAK debug action

Change-Id: I19ee76db3a380116c7c25819a112751d988e23b4

7 years agoloader: Replace overzealous warnings with info
Lenny Komow [Thu, 10 Aug 2017 15:25:49 +0000 (09:25 -0600)]
loader: Replace overzealous warnings with info

The new ICD search functionality was logging warnings in some places
where information was more appropriate, such as when opening a device
or for some errors that simply indicated that the new format is not
supported yet.

Change-Id: Ifc8ce33d778783f3f55102783bf6ede0dd7c2a00

7 years agoloader: Don't load manifest files more than once
Lenny Komow [Wed, 9 Aug 2017 22:01:59 +0000 (16:01 -0600)]
loader: Don't load manifest files more than once

Change-Id: I2802ad0c1fd16c0287ed24b96ec6d81c4b3c711a

7 years agoloader: Fix size handling when scanning registries
Slawomir Cygan [Wed, 9 Aug 2017 09:36:52 +0000 (11:36 +0200)]
loader: Fix size handling when scanning registries

loaderGetRegistryFiles() should not start from 4096 size, if
loaderGetDeviceRegistryFiles function has already appended something
into the buffer.

7 years agoloader: Add new ICD search paths to loader
Slawomir Cygan [Mon, 3 Jul 2017 14:47:52 +0000 (16:47 +0200)]
loader: Add new ICD search paths to loader

This change extends the functionality of searching for ICD JSONs by
adding registry locations specific to given display adapter and
software components associated with this display adapter.

The exact locations in registry are queried using Windows public PnP
Configuration Manager API[1].

This change is required, as previous ICD locations (constant path
in "HKLM/Software") may be unreachable for drivers and their
installers on Windows RS3[2].

Similar change is being made for OpenCL[2]

[1]https://msdn.microsoft.com/en-us/library/windows/hardware/ff549713.aspx
[2]https://github.com/KhronosGroup/OpenCL-ICD-Loader/pull/21

7 years agolayers: PR1950, Update subresource range VUIDs
Petr Kraus [Tue, 8 Aug 2017 19:46:02 +0000 (21:46 +0200)]
layers: PR1950, Update subresource range VUIDs

With updated test names in database.

Change-Id: Ie6cb2dfa9fa84de2dd0dea645249fe03c6780eba

7 years agotests:Use OneOffDescriptorSet
Tobin Ehlis [Wed, 9 Aug 2017 18:21:24 +0000 (12:21 -0600)]
tests:Use OneOffDescriptorSet

Update WriteDescriptorSetConsecutiveUpdates to use OneOffDescriptorSet.
Use OneOffDescriptorSet! It saves lines of code.

7 years agotests:Add WriteDescriptorSetConsecutiveUpdates
Tobin Ehlis [Wed, 9 Aug 2017 15:15:59 +0000 (09:15 -0600)]
tests:Add WriteDescriptorSetConsecutiveUpdates

Test a consecutive descriptor update where last buffer in update comes
from a roll-over update to the next binding. Destroy that buffer before
use to verify that an error is correctly flagged. This was previously a
bug in descriptor validation.

7 years agolayers:Fix consecutive binding updates
Tobin Ehlis [Wed, 9 Aug 2017 15:10:37 +0000 (09:10 -0600)]
layers:Fix consecutive binding updates

Fixes #1992

When we're wrapping a descriptor update for consecutive bindings, fix
code so that index into update array consistently increases.

7 years agobuild: PR1972, Install vk_layer_dispatch_table.h hdr
Bas Nieuwenhuizen [Tue, 25 Jul 2017 21:58:20 +0000 (23:58 +0200)]
build: PR1972, Install vk_layer_dispatch_table.h hdr

vk_layer.h is installed and includes it. Also, vk_layer.h is needed
to write third party layers, so I don't think not installing vk_layer.h
is an option.

Change-Id: I3e34d8484fdc5092edff3bab72991303a4aeb2c7

7 years agolayers: Untangle side effects in CmdWaitEvents
Chris Forbes [Wed, 9 Aug 2017 00:35:51 +0000 (17:35 -0700)]
layers: Untangle side effects in CmdWaitEvents

7 years agotests: Add PushDescriptorNullDstSetTest test
Tony Barbour [Tue, 8 Aug 2017 18:56:31 +0000 (12:56 -0600)]
tests: Add PushDescriptorNullDstSetTest test

Make sure that dstSet is ignored in vkCmdPushDescriptorSetKHR calls

Change-Id: I5880d2bf6f59f63037244397a54a09579f71989e

7 years agolayers: Fix CmdPushDescriptorSet object tracker
Tony Barbour [Tue, 8 Aug 2017 18:51:33 +0000 (12:51 -0600)]
layers: Fix CmdPushDescriptorSet object tracker

Ignore the dstSet field of VkWriteDescriptorSet as indicated
by the spec

Change-Id: I28ca6ea3059f5528bdf369954e1621ef670e0d54

7 years agoUpdate commit IDs: glslang,tools
Mike Weiblen [Mon, 7 Aug 2017 18:02:27 +0000 (12:02 -0600)]
Update commit IDs: glslang,tools

Change-Id: Ie24b136b2df3718ba1c9ee493d69716304795a11

7 years agodemos: Revert AppDevInitFormat changes
Mike Schuchardt [Mon, 7 Aug 2017 19:11:09 +0000 (13:11 -0600)]
demos: Revert AppDevInitFormat changes

Calling vkGetPhysicalDeviceFormatProperties with extension formats is
not valid and causes crashes on some drivers.  Revert the list of
VkFormats to the original range.

Change-Id: I2b7f0bd5bb49a66cd073216e93e3bba35c67ab98

7 years agolayers: Fix swapchain extent check
Cort [Sat, 5 Aug 2017 23:32:14 +0000 (16:32 -0700)]
layers: Fix swapchain extent check

This fixes a regression introduced -- by me :( -- in commit
583b0c41dfd0876d0481920f2e6d8d87433bc1d7. The swapchain's
imageExtent must always be within the surface's min/max extent,
regardless of the surface's current extent.

7 years agotests: Add PhysicalDeviceFormatProperties dev_profile
Tony Barbour [Thu, 27 Jul 2017 23:12:20 +0000 (17:12 -0600)]
tests: Add PhysicalDeviceFormatProperties dev_profile

Add spoofing PhysicalDeviceFormatProperties to the
device_profile_api layer

Add the following to ExceedMemoryAllocationCount to test:

PFN_vkSetPhysicalDeviceFormatPropertiesEXT fpvkSetPhysicalDeviceFormatPropertiesEXT =
    (PFN_vkSetPhysicalDeviceFormatPropertiesEXT)vkGetInstanceProcAddr(instance(), "vkSetPhysicalDeviceFormatPropertiesEXT");
PFN_vkGetOriginalPhysicalDeviceFormatPropertiesEXT fpvkGetOriginalPhysicalDeviceFormatPropertiesEXT =
    (PFN_vkGetOriginalPhysicalDeviceFormatPropertiesEXT)vkGetInstanceProcAddr(instance(), "vkGetOriginalPhysicalDeviceFormatPropertiesEXT");

VkFormatProperties formatProps;
fpvkGetOriginalPhysicalDeviceFormatPropertiesEXT(gpu(), VK_FORMAT_B8G8R8A8_UNORM, &formatProps);
assert(!(formatProps.bufferFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT));
formatProps.bufferFeatures |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT;
fpvkSetPhysicalDeviceFormatPropertiesEXT(gpu(), VK_FORMAT_B8G8R8A8_UNORM, formatProps);
memset(&formatProps, 0, sizeof(formatProps));
vkGetPhysicalDeviceFormatProperties(gpu(), VK_FORMAT_B8G8R8A8_UNORM, &formatProps);
assert(formatProps.bufferFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT);

Change-Id: I46fe6a8ade59043b36c7f1baa5d613201692d5c0

7 years agotests: Get rid of original data map in dev profile
Tony Barbour [Thu, 27 Jul 2017 22:34:25 +0000 (16:34 -0600)]
tests: Get rid of original data map in dev profile

Change-Id: Ia5e2be79bbd3941fe5eeada4a3e82235de50c12f

7 years agotests: Make dev_profile data a struct
Tony Barbour [Wed, 26 Jul 2017 21:57:02 +0000 (15:57 -0600)]
tests: Make dev_profile data a struct

To let us add more fields as we need them

Change-Id: I210b72e262f5f97cb21a39f13007b90e6b0e544e

7 years agolayers: Fix incorrect VUID for negative viewport ht
Mark Lobodzinski [Wed, 2 Aug 2017 16:45:24 +0000 (10:45 -0600)]
layers: Fix incorrect VUID for negative viewport ht

Layers used the wrong VUID for the checks for negative viewport
height if the extensions were not enabled.

Fixed existing test, added a new test, and updated the database,
and removed special case from validation_stats script.

Change-Id: Ia165e6245990a4fabb3745102b345a7b4f1b0202

7 years agolayers: Don't do bogus transitions in invalidateCommandBuffers
Chris Forbes [Wed, 2 Aug 2017 00:19:52 +0000 (17:19 -0700)]
layers: Don't do bogus transitions in invalidateCommandBuffers

Total nonsense like:

  RECORDING -> INVALID_INCOMPLETE -> INVALID_COMPLETE

was possible when there were two invalidations.

7 years agoheader: Update to version 1.0.57 of the vulkan hdr
Mark Lobodzinski [Tue, 1 Aug 2017 15:15:06 +0000 (09:15 -0600)]
header: Update to version 1.0.57 of the vulkan hdr

- updated vulkan.h
- updated vk.xml
- updated cgenerator.py
- updated Win/Lin json files
- updated and fixed vk_validation_error_database.h
- updated vk_validation_error_messages.h
- updated vulkan.hpp

Change-Id: Idebc490660833daac43d234db44131e9bf2b910b

7 years agoexternal: Update commit IDs: glslang,tools,header
Mike Weiblen [Fri, 28 Jul 2017 19:18:39 +0000 (13:18 -0600)]
external: Update commit IDs: glslang,tools,header

Update external reference commit IDs for Desktop and Android

Change-Id: I0b79c9e030e06479d1f07d4d3372dcc96bfa2f0e

7 years agolayers:Rename lambda function container
Tobin Ehlis [Fri, 28 Jul 2017 18:11:30 +0000 (12:11 -0600)]
layers:Rename lambda function container

Change name to queue_submit_functions to reflect the fact that validate
functions in this container are executed at QueueSubmit() time.

7 years agolayers:Pass framebuffer into barrier lambda
Tobin Ehlis [Fri, 28 Jul 2017 17:56:04 +0000 (11:56 -0600)]
layers:Pass framebuffer into barrier lambda

Pass framebuffer into image barrier validation lambda so that secondary
CB state doesn't have to be updated in CmdExecuteCommands. Just pass in
framebuffer from primary CB instead.

Update secondary CB lambda container name to reflect the fact that those
functions are executed at CmdExecuteCommands() time.

7 years agotests:Add InvalidSecondaryCommandBufferBarrier
Tobin Ehlis [Thu, 27 Jul 2017 20:50:49 +0000 (14:50 -0600)]
tests:Add InvalidSecondaryCommandBufferBarrier

Add a test where image barrier image mis-matches the FB image which is
inherited from the primary command buffer.

7 years agotests:Positive test of barriers in secondary CB
Tobin Ehlis [Thu, 27 Jul 2017 20:49:40 +0000 (14:49 -0600)]
tests:Positive test of barriers in secondary CB

Add a memory barrier and image barrier in a secondary CB that inherits
the renderPass state from the primaryCB it's executed from.

7 years agolayers:Delay barrier validation for secondary CB
Tobin Ehlis [Thu, 27 Jul 2017 17:08:00 +0000 (11:08 -0600)]
layers:Delay barrier validation for secondary CB

When a secondary command buffer doesn't have a framebuffer, queue up
any renderPass barrier validation until submit time when we know we'll
have a framebuffer bound.

Added a separate vector of validation functions that are added to
secondary command buffer for this case and then executed at
CmdExecuteCommands() time.

Migrated the image validation that needs to be delayed to its own
function. This makes it easy to add to the delayed function array and
capture a copy of the image barrier that needs to be validated.
In CmdExecuteCommands() when validation runs inherit the activeFB
from the primaryCB into the secondary CB.

7 years agodemos: Fix cube to use correct pipeline stage for barrier
Tony Barbour [Fri, 28 Jul 2017 15:08:26 +0000 (09:08 -0600)]
demos: Fix cube to use correct pipeline stage for barrier

Change-Id: Ia85e0acc67694d859077044ad24b13b0ad834811

7 years agotests: Update VALIDATION_ERROR_1b800942
Tony Barbour [Fri, 28 Jul 2017 16:08:24 +0000 (10:08 -0600)]
tests: Update VALIDATION_ERROR_1b800942

Change-Id: I14651b387848d3d1cc8bd3f5e0051ba8dce12e66

7 years agotests:Verify 0 srcAccessMask doesn't cause error
Tobin Ehlis [Wed, 26 Jul 2017 15:07:03 +0000 (09:07 -0600)]
tests:Verify 0 srcAccessMask doesn't cause error

Set srcAccessMask to 0 in an existing test in order to verify that it
doesn't trigger an error.

7 years agotests:Fix bad access/stage mask combo
Tobin Ehlis [Mon, 24 Jul 2017 21:52:33 +0000 (15:52 -0600)]
tests:Fix bad access/stage mask combo

DepthStencilLayoutTransitionForDepthOnlyImageview test used mis-matched
src/dstAccessMasks and StageMasks. Fix this to avoid unexpected error
due to new validation check for this case.

7 years agotests:Test dstAccessMask/dstStageMask conflict
Tobin Ehlis [Mon, 24 Jul 2017 21:19:23 +0000 (15:19 -0600)]
tests:Test dstAccessMask/dstStageMask conflict

New test case for VALIDATION_ERROR_1b800942.
Create dstAccessMask conflict with dstStageMask in memory barrier.

Fix a bunch of existing test cases that were triggering this new
check b/c dstStageMask conflicted w/ barrier dstAccessMask.

Also tweak a couple of test cases to verify multi-bit accessMasks are
correctly checked. Update failing srcAccessMask so that a lower-order
bit is supported to make sure we correctly parse through to the higher-
order bit that's not supported. Update a separate test to include two
supported bits in dstAccessMask to verify that no new errors occur.

7 years agolayers:Verify dstAccessMask supported by stageMask
Tobin Ehlis [Mon, 24 Jul 2017 20:58:09 +0000 (14:58 -0600)]
layers:Verify dstAccessMask supported by stageMask

This is VALIDATION_ERROR_1b800942.
Verify that barrier drcAccessMask is supported by drcStageMask.

7 years agotests:Test srcAccessMask/srcStageMask conflict
Tobin Ehlis [Mon, 24 Jul 2017 20:34:24 +0000 (14:34 -0600)]
tests:Test srcAccessMask/srcStageMask conflict

New test case for VALIDATION_ERROR_1b800940.
Create srcAccessMask conflict with srcStageMask in memory barrier.

Fix a bunch of existing test cases that were triggering this new
check b/c srcStageMask conflicted w/ barrier srcAccessMask.

7 years agolayers:Verify accessMask supported by stageMask
Tobin Ehlis [Mon, 24 Jul 2017 20:32:51 +0000 (14:32 -0600)]
layers:Verify accessMask supported by stageMask

This is VALIDATION_ERROR_1b800940.
Verify that barrier srcAccessMask is supported by srcStageMask.

7 years agotests:Test queueFamilyIndex for image barrier
Tobin Ehlis [Mon, 24 Jul 2017 18:57:52 +0000 (12:57 -0600)]
tests:Test queueFamilyIndex for image barrier

Add test for VALIDATION_ERROR_1b80093c to RenderPassBarrierConflicts.
For image barrier in renderPass, src&dstQueueFamilyIndex must be
VK_QUEUE_FAMILY_IGNORED.

7 years agolayers:Verify image barrier queueFamilyIndices
Tobin Ehlis [Mon, 24 Jul 2017 17:35:57 +0000 (11:35 -0600)]
layers:Verify image barrier queueFamilyIndices

This is VALIDATION_ERROR_1b80093c.

For image barrier in renderPass both src & dst queueFamilyIndex members
must be VK_QUEUE_FAMILY_IGNORED.

7 years agoscripts: Exclude disable extension enums
Mark Lobodzinski [Thu, 27 Jul 2017 18:09:08 +0000 (12:09 -0600)]
scripts: Exclude disable extension enums

Including these enums hosed up the private builds.

Change-Id: I74fcb628171dfd70e7bce03e7ede35d4d22a75b5

7 years agolayers: Add VUID for LogicOp validation check
Mark Lobodzinski [Wed, 26 Jul 2017 20:16:21 +0000 (14:16 -0600)]
layers: Add VUID for LogicOp validation check

Change-Id: I19f10ee8e45af336290b36107db8bfe1c41c3a88

7 years agolayers: Remove PV dead code, fixup comments
Mark Lobodzinski [Tue, 25 Jul 2017 21:32:11 +0000 (15:32 -0600)]
layers: Remove PV dead code, fixup comments

Change-Id: I94804f0b994618982afcb344dc88b92a9bee3336

7 years agoscripts: Generate PV calls to ranged_enum_array fcn
Mark Lobodzinski [Tue, 25 Jul 2017 21:29:57 +0000 (15:29 -0600)]
scripts: Generate PV calls to ranged_enum_array fcn

Change-Id: I106fe73c2199d1b4d8aa090bd22bb79884637d58

7 years agolayers: Add new ranged_enum_array val routine
Mark Lobodzinski [Tue, 25 Jul 2017 21:29:36 +0000 (15:29 -0600)]
layers: Add new ranged_enum_array val routine

Change-Id: I2b78d90bd248a6800f719ef89c534140cb217ad8

7 years agoscripts: Generate calls to new enum PV function
Mark Lobodzinski [Tue, 25 Jul 2017 21:10:29 +0000 (15:10 -0600)]
scripts: Generate calls to new enum PV function

Change-Id: I9692f1b2101d6cc1eef3bf55582dbf7980c4e8d2

7 years agolayers: Add new PV ranged enum validation function
Mark Lobodzinski [Tue, 25 Jul 2017 20:49:06 +0000 (14:49 -0600)]
layers: Add new PV ranged enum validation function

Uses new enum lists.

Change-Id: I24629770e1018f5938fa82d2a3da8eb1cd716de7

7 years agoscripts: Generate param_validation valid enum lists
Mark Lobodzinski [Tue, 25 Jul 2017 20:29:42 +0000 (14:29 -0600)]
scripts: Generate param_validation valid enum lists

Change-Id: I0dd6bf95bf54baa9a71f41a482bc52527944aea8

7 years agotests: Return errorcode on Windows if layer tests fail
Cody Northrop [Tue, 25 Jul 2017 19:17:02 +0000 (13:17 -0600)]
tests: Return errorcode on Windows if layer tests fail

7 years agotests: Fix requested feature test
Mark Lobodzinski [Tue, 25 Jul 2017 16:43:30 +0000 (10:43 -0600)]
tests: Fix requested feature test

Change-Id: Ib1bd1fe03fa062518b6c7e19f04e774e522af006

7 years agolayers: GH1924, Improve unavailable feature msg
Mark Lobodzinski [Mon, 24 Jul 2017 22:15:37 +0000 (16:15 -0600)]
layers: GH1924, Improve unavailable feature msg

Modified the unavailable requested feature error message to print the
feature name instead of just an index.

Change-Id: Idcb66921fc592014330dce6946631984d85cd866

7 years agoscripts: Add PDevFeature index print helper
Mark Lobodzinski [Mon, 24 Jul 2017 22:14:16 +0000 (16:14 -0600)]
scripts: Add PDevFeature index print helper

In the Enum string helper header, tack on a routine to convert an
index into a VkPhysicalDeviceFeatures structure into its
corresponding feature string.

Change-Id: I8fbfb6fcbfa63361a851ffc93ffd832696050d51

7 years agoscripts: Switch codegen to use structextends
Mike Schuchardt [Sun, 23 Jul 2017 18:47:47 +0000 (12:47 -0600)]
scripts: Switch codegen to use structextends

Replace all usages of the deprecated validextensionstructs member
attribute with the registry.validextensionstructs dict.  Internally the
registry builds this extension dictionary using the new structextends
type attribute.

Change-Id: I072ff707bfdfa1f576266291e4196837da526287

7 years agoheader: Update to version 1.0.56 of the Vulkan hdr
Mark Lobodzinski [Mon, 24 Jul 2017 17:05:40 +0000 (11:05 -0600)]
header: Update to version 1.0.56 of the Vulkan hdr

- updated vulkan.h
- updated vk.xml
- updated Win/Lin .json files
- updated vk_validation_error_database.h
- updated vk_validation_error_messages.h
- updated vulkan.hpp

Change-Id: Ibf64c8a1760743b3118794b0ef5f6d34b108bbbc

7 years agolayers: Add check for maintenance1 in test
Jeremy Kniager [Mon, 24 Jul 2017 19:59:27 +0000 (13:59 -0600)]
layers: Add check for maintenance1 in test

Change-Id: I6981c356207b132d9154336258f5d4f84d6ae912

7 years agotests:Make ImageBarrierSubpassConflict test
Tobin Ehlis [Fri, 21 Jul 2017 20:39:37 +0000 (14:39 -0600)]
tests:Make ImageBarrierSubpassConflict test

Move testcase out of RenderPassBarrierConflicts, where it was a bit
muddled and confusing, into ImageBarrierSubpassConflict where it can
stand alone and is easier to follow.

7 years agotests:Simplify image layout mismatch test
Tobin Ehlis [Fri, 21 Jul 2017 20:23:29 +0000 (14:23 -0600)]
tests:Simplify image layout mismatch test

Can change layout in img_barrier instead of creating a separate
renderPass with different layout in subpass attachment reference.
This simplifies RenderPassBarrierConflicts test.

7 years agolayers:Refactor image barrier validation
Tobin Ehlis [Fri, 21 Jul 2017 20:12:23 +0000 (14:12 -0600)]
layers:Refactor image barrier validation

Move image barrier validation within a renderPass into its own function
in order to break up existing code a bit. Add a check to make sure
framebuffer is valid before attempting to use FB state.