platform/upstream/Vulkan-LoaderAndValidationLayers.git
5 years agoadd REDUCE_VK_LD_LAYER_PROP_SIZE feature 08/192708/1 accepted/tizen_5.0_unified accepted/tizen_unified tizen_5.0 tizen_deprecated_loader accepted/tizen/5.0/unified/20181109.062746 accepted/tizen/unified/20181112.060844 submit/tizen/20181108.102212 submit/tizen/20181108.102339 submit/tizen_5.0/20181108.102409
SooChan Lim [Thu, 8 Nov 2018 07:18:06 +0000 (16:18 +0900)]
add REDUCE_VK_LD_LAYER_PROP_SIZE feature

This feature reduce the size of the layer_properties and the string size at loader.
This PSS size can be reduced by enabling this feature.
However, vulkan driver have to realize the maximum size of the number of layer_properties
and the string.

Change-Id: Ie1ae9e5c1154eb3dcd4b6782951cc7593084dba3

5 years agospec: Package version up to 1.1.74 41/191941/1
Joonbum Ko [Thu, 25 Oct 2018 09:42:30 +0000 (18:42 +0900)]
spec: Package version up to 1.1.74

Change-Id: Idc94f2e4130252ffe64dd257d64c30023691b437
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
5 years agoBackporting to support VK_EXT_image_drm_format_modifier. 40/191940/1
Joonbum Ko [Thu, 25 Oct 2018 09:42:00 +0000 (18:42 +0900)]
Backporting to support VK_EXT_image_drm_format_modifier.

Change-Id: Id4dc27ca21067afb2aa629ce0284fedbd619164e
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
5 years agoMerge remote-tracking branch 'origin/upstream' into tizen 39/191939/1
Joonbum Ko [Mon, 22 Oct 2018 01:00:34 +0000 (10:00 +0900)]
Merge remote-tracking branch 'origin/upstream' into tizen

Change-Id: I919d155e3bc4ba5e97d11ec9bb8732e0058b0d69
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
5 years agospec: Changed BuildRequires for glslang to glslang-devel. 42/182042/1 accepted/tizen/5.0/unified/20181102.023735 accepted/tizen/unified/20180621.141323 submit/tizen/20180620.051627 submit/tizen_5.0/20181101.000005
joonbum.ko [Tue, 19 Jun 2018 05:40:51 +0000 (14:40 +0900)]
spec: Changed BuildRequires for glslang to glslang-devel.

Change-Id: I795a4fc612ad002e6f93f5a306e285de6de1638c
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
5 years agospec: Added package requires for devel package. 41/182041/1
joonbum.ko [Tue, 19 Jun 2018 05:38:52 +0000 (14:38 +0900)]
spec: Added package requires for devel package.

Change-Id: Iaf1fb20c486cb6b65327fddc42e396e86fc6d889
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
5 years agoMove *.json files to default search path of Vulkan Loader, so user 78/180178/1
Xuelian Bai [Fri, 25 May 2018 16:29:19 +0000 (00:29 +0800)]
Move *.json files to default search path of Vulkan Loader, so user
don't need to set VK_LAYER_PATH environment variable.

Change-Id: I98b99d3652f5572211a061d35c3e5c3a267c639b

5 years agoRemove dependency of glslang-devel to avoid build errors 17/179117/1
Xuelian Bai [Wed, 16 May 2018 10:14:59 +0000 (18:14 +0800)]
Remove dependency of glslang-devel to avoid build errors

Change-Id: I9d31d5b1cea5e481ce008324dbcc12f450d115bd

5 years agodocs: Update readme to reflect repo deprecation upstream/1.1.74
Mark Lobodzinski [Mon, 14 May 2018 04:15:37 +0000 (22:15 -0600)]
docs: Update readme to reflect repo deprecation

Change-Id: Id6b3a7845ae194a18cc01b0f9d2fa6b178867b76

5 years agoicd:Add GPDP2 support for descriptor indexing
Tobin Ehlis [Fri, 11 May 2018 19:44:33 +0000 (13:44 -0600)]
icd:Add GPDP2 support for descriptor indexing

Set some default mock icd values for vkGetPhysicalDeviceProperties2
query of VkPhysicalDeviceDescriptorIndexingPropertiesEXT props.

5 years agolayers:Moving to GPDF2
Tobin Ehlis [Fri, 11 May 2018 17:11:34 +0000 (11:11 -0600)]
layers:Moving to GPDF2

Update layer_data struct to track safe_VkPhysicalDeviceFeatures2 struct
instead of VkPhysicalDeviceFeatures. Currently just doing previous
checks using the VkPhysicalDeviceFeatures member of GPDF2 struct. Will
follow-on with checking against extension structs.

5 years agolayers:Store GPDF2 struct
Tobin Ehlis [Fri, 11 May 2018 13:39:16 +0000 (07:39 -0600)]
layers:Store GPDF2 struct

In PHYSICAL_DEVICE_STATE track safe_VkPhysicalDeviceFeatures2 instead
of the old VkPhysicalDeviceFeatures. Initially just passing the
VkPhysicalDeviceFeatures of VkPhysicalDeviceFeatures2 wherever this was
used. This is laying groundwork to start using/comparing extended
features in core validation.

5 years agoicd:Fix Windows build
Tobin Ehlis [Fri, 11 May 2018 16:09:41 +0000 (10:09 -0600)]
icd:Fix Windows build

Make sure we generate vk_typemap_helper.h for mock icd.

5 years agolayers: add missing VkFormatFeatureFlags checks
Cort Stratton [Wed, 2 May 2018 00:18:06 +0000 (20:18 -0400)]
layers: add missing VkFormatFeatureFlags checks

Checks for TRANSFER_SRC / TRANSFER_DST formats were added to:
- vkCmdClearColorImage
- vkCmdCopyImage
- vkCmdResolveImage
- vkCmdCopyImageToBuffer
- vkCmdCopyBufferToImage
These checks require VK_KHR_maintenance1 or Vulkan 1.1.

Existing checks were adapted to use the new helper function:
- vkCmdClearDepthStencilImage
- vkCmdBlitImage

5 years agolayers: Add GetApiVersion() helper
Cort Stratton [Fri, 4 May 2018 18:35:18 +0000 (14:35 -0400)]
layers: Add GetApiVersion() helper

5 years agolayers: fix imageview 3D layout transition
Dave Houlton [Tue, 8 May 2018 20:58:01 +0000 (14:58 -0600)]
layers: fix imageview 3D layout transition

Fix an oversight when recording a 3D image subresource layout transition
that is set by way of a 2D or 2D_ARRAY image view.

Change-Id: Ifbf7645fb2705fef6f82030f4e3e1da0e9da2f2c

5 years agodemos: Add MacOS surface output to vulkaninfo
Jeremy Kniager [Wed, 9 May 2018 20:23:32 +0000 (14:23 -0600)]
demos: Add MacOS surface output to vulkaninfo

Added output for a MacOSSurface in vulkaninfo
and modified the CMake files to include the
new files needed for this change:

metal_view.m Objective-C code to hook into Metal
metal_view.h metal_view.m's header file

Change-Id: Ib7f9185a86703b2a300b2ce3be46f130c90d1b6b

5 years agoicd:Add support for extended features queries
Tobin Ehlis [Wed, 9 May 2018 22:39:27 +0000 (16:39 -0600)]
icd:Add support for extended features queries

Update mock ICD generator so that if we have an extension that's been
promoted to core, the core version will call any existing custom
implementation of the extension function.

Update Features query to detect the two existing extension structs
(VkPhysicalDeviceDescriptorIndexingFeaturesEXT and
VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT) and enable all of
those features when those queries are present.

5 years agotests:Compare VkBool32 against VK_FALSE
Tobin Ehlis [Wed, 9 May 2018 22:39:09 +0000 (16:39 -0600)]
tests:Compare VkBool32 against VK_FALSE

5 years agotests: Update tests to remove duplicate slashes
Lenny Komow [Thu, 10 May 2018 21:23:09 +0000 (15:23 -0600)]
tests: Update tests to remove duplicate slashes

Change-Id: Ie09bfcd61c57024f4c7a0ff884001989fec2a565

5 years agoloader: Fix gcc 8.1 cast warning
Lenny Komow [Wed, 9 May 2018 17:09:58 +0000 (11:09 -0600)]
loader: Fix gcc 8.1 cast warning

Change-Id: Id8f0301c4f208d185abe2cc3df71021cb4aa29b1

5 years agoloader: Fix unhandled out of memory errors
Lenny Komow [Wed, 9 May 2018 16:48:41 +0000 (10:48 -0600)]
loader: Fix unhandled out of memory errors

Change-Id: I3b672a9d54e1509b550407f1b4ffae58b48beb85

5 years agoloader: Remove duplicated delimiting chars in paths
Martin Blanchard [Wed, 9 May 2018 21:47:12 +0000 (22:47 +0100)]
loader: Remove duplicated delimiting chars in paths

Before loading a manifest file, its full path is strcmp() with already
loaded ones in order not to load the same file twice. While being simple
and efficent, this mechanism is not able to detect subtle duplicates
like these:

/usr/share/vulkan/icd.d/intel_icd.x86_64.json
/usr/share//vulkan/icd.d/intel_icd.x86_64.json

This patch ensure that searched paths do not contains such duplicated
directory delimiting characters in order to avoid this kind of problem.

Fixes #2331
Fixes #2629

5 years agotests: Fix min image transfer granularity test
William Henning [Fri, 4 May 2018 19:08:05 +0000 (13:08 -0600)]
tests: Fix min image transfer granularity test

This test as written was guaranteed to be skipped. It would skip the
test if the first graphics queue family found had a
minImageTransferGranularity with a width, height, or depth of less
than 4. The spec guarantees that any graphics queue family's min
transfer granularity will be 1 for the width, height, and depth. The
rewritten test is now only skipped if no queue supporting copy
operations is found with a large enough granularity.

Also the usage flags on the src and dst image needed to be fixed.
Additionally, the extent of the copies dst and src images were changed
to always be multiples of the min transfer granularity.

Finally, I added a device profile that has a queue with a large enough
min transfer granularity to not skip this test.

5 years agotests: Clean up multiplane view format test
William Henning [Mon, 7 May 2018 22:02:02 +0000 (16:02 -0600)]
tests: Clean up multiplane view format test

Simplified this test by using VkImageObj in place of direct vulkan
calls. Additionally added a fake multiplane image format to the geforce
940m device profile so that this repo would have a device profile that
doesn't skip this test.

5 years agolayers: Rework attachment use conflict checks
Chris Forbes [Fri, 4 May 2018 00:36:39 +0000 (17:36 -0700)]
layers: Rework attachment use conflict checks

Previously buffer_validation covered part of this, but not everything.

V2: - Fix repeated ATTACHMENT_RESOLVE where I meant ATTACHMENT_PRESERVE
    - Fix camelcase noise in a bunch of places
    - Rename VkAttachmentReference& variables to attachment_ref to avoid
      attachment.attachment etc.
    - clang-format tidy-up
    - Move positive case to VkPositiveLayerTest

5 years agolayers: Do renderpass dag validation before call
Chris Forbes [Fri, 4 May 2018 00:10:50 +0000 (17:10 -0700)]
layers: Do renderpass dag validation before call

Previously this would contribute to skip /after/ the call, which
accomplishes nothing.

5 years agotests: Simplify CopyImageLayerCountMismatch test
William Henning [Fri, 4 May 2018 23:25:43 +0000 (17:25 -0600)]
tests: Simplify CopyImageLayerCountMismatch test

Simplified this test by using VkImageObj in place of direct Vulkan
calls.

6 years agodemos: Unify capitlization in json output
Shannon McPherson [Thu, 3 May 2018 16:16:45 +0000 (10:16 -0600)]
demos: Unify capitlization in json output

Change-Id: Ie74c686af656e346789b30ec1aba41457170c6d2

6 years agodemos: Add help options to vulkaninfo
Shannon McPherson [Wed, 2 May 2018 22:28:00 +0000 (16:28 -0600)]
demos: Add help options to vulkaninfo

Change-Id: I43886920e5ce1feb2e293ed46a3e8c23a217ca69

6 years agolayers: fix a multiplane imageview bug
Dave Houlton [Fri, 4 May 2018 18:37:44 +0000 (12:37 -0600)]
layers: fix a multiplane imageview bug

Change-Id: If11059dca9716a90134d9d362351634fa07a8ecd

6 years agotests: Fix some renderframework bugs
Mark Lobodzinski [Fri, 4 May 2018 21:56:04 +0000 (15:56 -0600)]
tests: Fix some renderframework bugs

Piers found a couple of typos in the device extension handling.

Change-Id: I0068f07bdbfca9715cac319feb56a3fc2b6402fb

6 years agotests: Simplify DSAspectBitErrors test
William Henning [Fri, 4 May 2018 22:10:29 +0000 (16:10 -0600)]
tests: Simplify DSAspectBitErrors test

Simplified this test by using test helpers in place of direct Vulkan
calls. Also added a TODO to switch this test from checking for an error
string to checking for an error VUID when the specific error is given a
VUID.

6 years agolayers: Track display and display mode objects
Shannon McPherson [Wed, 2 May 2018 21:24:37 +0000 (15:24 -0600)]
layers: Track display and display mode objects

Add VkDisplayKHR and VkDisplayModeKHR tracking to
VK_LAYER_LUNARG_object_tracker.

Change-Id: I63004cfe734793593bea12700ea9cd1bdefeab0d

6 years agolayers: image transfer granularity check fixes
Cort Stratton [Fri, 4 May 2018 05:12:23 +0000 (01:12 -0400)]
layers: image transfer granularity check fixes

- Use appropriate VUIDs for all checks
- Update tests to check for VUIDs instead of message substrings
- Image granularity tests should be also be run on compressed images.
  They're *mostly* redundant with existing compressed-format-only checks,
  but I can't convince myself that they're *always* redundant, and the
  spec doesn't say to skip them.
- Removed comments that the checks should be moved elsewhere; IMO they're
  fine where they are, but I welcome second opinions.
- Compressed-format alignment checks should also apply to _422 single-plane
  formats.

6 years agolayers: Fix down-chain null funcptr crashes
Mark Lobodzinski [Thu, 3 May 2018 19:16:52 +0000 (13:16 -0600)]
layers: Fix down-chain null funcptr crashes

Modified dispatch table helper to replace null device extension
function pointers with an appropriate stub function.

Change-Id: If5e22333f084d3f41c0eefdf3e82c9060b872e8c

6 years agodemos: Fix cube ActualTimeLate function
Liam Middlebrook [Thu, 3 May 2018 22:52:32 +0000 (15:52 -0700)]
demos: Fix cube ActualTimeLate function

The ActualTimeLate function in cube.c is supposed to check if a
VkPastPresentationTimingGOOGLE structure indicates that the
presentation happened within a refresh-cycle duration of the
desired presentation time.

However currently ActualTimeLate will always return false, because
it is calculating the presentation deadline as `actual + rdur`.
This change calculated the presentation deadline as
`desired + rdur`.

Reviewed-by: Andy Ritger <aritger@nvidia.com>
6 years agotests: Add tests for indexed draw checking
Karl Schultz [Wed, 2 May 2018 00:32:06 +0000 (18:32 -0600)]
tests: Add tests for indexed draw checking

New tests to exercise new checks for indexed draw count and offset.

Add VkRenderFramework::DestroyRenderTarget() and call it from
VkTriangleTest so that VkTriangleTest cleans up after itself,
allowing it to be called multiple times within a single framework
instantiation.

Introduce VkBufferObj as a typedef for vk_testing::Buffer.

Fixes #2448

Change-Id: Iab513c7f50ef390c210ea76e7ef3f67d7e3d40f8

6 years agolayers: Add checks for indexed draw count/offset
Karl Schultz [Thu, 3 May 2018 01:40:34 +0000 (19:40 -0600)]
layers: Add checks for indexed draw count/offset

Check that the first index and index count are within the bounds
of an index buffer for DrawIndexed, taking into account any
offset specified in the binding of the index buffer.

Fixes #2448

Change-Id: I47a1acbf0bb0e586692c75380d8d43a1c72450fd

6 years agolayers: remove duplicate GetEnabledExtensions() function
Cort Stratton [Thu, 3 May 2018 17:42:10 +0000 (13:42 -0400)]
layers: remove duplicate GetEnabledExtensions() function

6 years agotests: Clean up MapMemWithoutHostVisibleBit test
William Henning [Wed, 2 May 2018 16:42:26 +0000 (10:42 -0600)]
tests: Clean up MapMemWithoutHostVisibleBit test

Simplified this test by removing an uneccessary creation of a VkImage.
Instead, the test now just directly allocates unmappable memory and
attempts to map it.

6 years agolayers: Remove Fill Memory warnings
Mark Lobodzinski [Tue, 1 May 2018 18:58:13 +0000 (14:58 -0400)]
layers: Remove Fill Memory warnings

Implementation was incomplete, and had been reduced to producing
non-specified warnings.

Change-Id: I34a4bbf1f572f337b5f9f9316e9717f52645d8dc

6 years agolayers: Fix segv during DebugReportCallback setup
John Zulauf [Tue, 1 May 2018 19:28:27 +0000 (13:28 -0600)]
layers: Fix segv during DebugReportCallback setup

Change debug log message to use correct VkObjectType to
VkDebugReportObjectTypeEXT method, avoiding the index out-of-bounds
lookup that caused a SEGV.

Change-Id: Ibb6e485eccb36ff0e9b49f0722d8f2d0bf660982

6 years agolayers: PreRecord Free/Destroy calls
John Zulauf [Thu, 26 Apr 2018 22:30:39 +0000 (16:30 -0600)]
layers: PreRecord Free/Destroy calls

To avoid Destroy/Create and Free/Alloc race conditions (when a driver
returns a destroyed(freed) handle between the PreCall and PostCall
phases of a validation intercept routine, PostCallRecord functionality
has been moved to PreCall.  This affects the following calls

FreeMemory
DestroyFence
DestroySemaphore
DestroyEvent
DestroyQueryPool
DestroyBuffer
DestroyBufferView
DestroyImage
DestroyImageView
DestroyPipeline
DestroySampler
DestroyDescriptorSetLayout
DestroyFramebuffer
DestroyRenderPass
FreeDescriptorSets

Did not alter the destroy functions for Instance, Device, or the Debug
or layer extensions.

Change-Id: I5133982eaa1a0c94283fa922d9c3bcc90b5a6223

6 years agocore validation: extend CLEAR LOAD_OP check to new DS image layouts
Slawomir Cygan [Tue, 24 Apr 2018 15:18:26 +0000 (17:18 +0200)]
core validation: extend CLEAR LOAD_OP check to new DS image layouts

Extend check for load operation vs first time use image layout to
new read-only depth stencil image layouts.

The new layouts were added in VK_KHR_maintenance2 / Vulkan 1.1
and follow similar restrictions to VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL.

Spec:

"
For any member of pAttachments with a loadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR,
 the first use of that attachment must not specify a layout equal to
VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL.

For any member of pAttachments with a stencilLoadOp equal to VK_ATTACHMENT_LOAD_OP_CLEAR,
the first use of that attachment must not specify a layout equal to
VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL.
"

6 years agotests: test behavior when dualSrcBlend feature is disabled
Cort Stratton [Wed, 25 Apr 2018 20:44:08 +0000 (13:44 -0700)]
tests: test behavior when dualSrcBlend feature is disabled

6 years agolayers: validate dual-source-blend factors
Cort Stratton [Wed, 25 Apr 2018 05:20:11 +0000 (22:20 -0700)]
layers: validate dual-source-blend factors

Fixes #2614

Fixed the following issues with the previous checks:

- Only alpha blend factors were checked
- The checks did not use the individual VUIDs for
  each blend factor field
- The check was being run at pipeline bind time,
  not pipeline creation time

6 years agolayers: Install into the data root directory
Nick Sarnie [Sun, 22 Apr 2018 22:44:48 +0000 (18:44 -0400)]
layers: Install into the data root directory

The layers files fit are not really configuration files and are rarely
edited by users. So, let's move the install location into the
data root directory.

Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
6 years agolayers: Add missing promoted device extensions
John Zulauf [Wed, 25 Apr 2018 21:40:32 +0000 (15:40 -0600)]
layers: Add missing promoted device extensions

Add three missing device extensions to promoted device extensions list
in vk_extension_helper codegen.

    VK_KHR_relaxed_block_layout
    VK_KHR_shader_draw_parameters
    VK_KHR_storage_buffer_storage_class

Change-Id: I392155d318ca580e576436ef46695218e5eb446e

6 years agolayers: Sort promoted extensions list
John Zulauf [Wed, 25 Apr 2018 21:28:47 +0000 (15:28 -0600)]
layers: Sort promoted extensions list

For ease of maintenance, sort the promoted extension lists.

Change-Id: Ib1d690d55c6b9c3a156c9682fbe96bbebed17c14

6 years agolayers: multiplane view format compatibility
Dave Houlton [Mon, 16 Apr 2018 17:46:56 +0000 (11:46 -0600)]
layers: multiplane view format compatibility

Add check for compatible format when creating an imageview of a
plane of a multiplane image.

Add test to exercise.

Change-Id: Id3388aa49b42a16e84dc1d459121ee908b2e5f0f

6 years agodemos: Sort most vkinfo output alphanumerically
Shannon McPherson [Fri, 20 Apr 2018 20:51:36 +0000 (14:51 -0600)]
demos: Sort most vkinfo output alphanumerically

Sections left unsorted: Presentable Surfaces, VkQueueFamilyProperties,
and Format Properties

Change-Id: I075a6897c3070f70d7073c22e7100c49c19073a3

6 years agolayers: Implement extension dependency validation
John Zulauf [Mon, 16 Apr 2018 17:00:43 +0000 (11:00 -0600)]
layers: Implement extension dependency validation

Add CreateInstance and CreateDevice validation checks for extension
dependencies.

VALIDATION_ERROR_1fc00ad6
   VUID-vkCreateDevice-ppEnabledExtensionNames-01387
VALIDATION_ERROR_21200ad8
   VUID-vkCreateInstance-ppEnabledExtensionNames-01388

Change-Id: Ia78f15494f10a1eca6a2a33e3a22d769b5d38785

6 years agotests: Fixed extension dependency in layer tests
John Zulauf [Mon, 16 Apr 2018 16:53:32 +0000 (10:53 -0600)]
tests: Fixed extension dependency in layer tests

Additional validation checks (in subsequent commit) exposed two
extension dependency errors. Platform specific surface extensions were
specified with specifying the base extension -- but were unneeded and
deleted.  The external memory capabilities extensions was missing from
and external memory validation test in one case, and extension support
was not fully tested in another.

Change-Id: Id0ae8ec039e8e1a937accee3b7795f9d02abe9ed

6 years agolayers: Add string_join utility
John Zulauf [Thu, 12 Apr 2018 21:47:26 +0000 (15:47 -0600)]
layers: Add string_join utility

Added utility modelled on script languague "join" command for
concatenating collections of strings (of various types).

Change-Id: Ia6ee7a144e7abc49a3356e9e20802706191947c1

6 years agolayers: Add dependency info to vk_extension_helper
John Zulauf [Thu, 12 Apr 2018 21:34:39 +0000 (15:34 -0600)]
layers: Add dependency info to vk_extension_helper

Add additional metadata to *Extensions structs to enable extension
dependency validation at CreateInstance CreateDevice time.

Refactor the code generator for the extension helper prior to
refactoring the generated code to address an incomplete.

Change-Id: I79ae680d9c41f1f153ee8108d4deac8ec8c5a886

6 years agolayers: Refactor codegen for vk_extension_helper
John Zulauf [Thu, 12 Apr 2018 20:24:57 +0000 (14:24 -0600)]
layers: Refactor codegen for vk_extension_helper

Refactor vk_extension helper prior to adding extension dependency
information to code gen. Refactor to simplify feature addition.

Change-Id: I7b2902dd1a4070c83810f57c0836b50cb6ecfb86

6 years agoloader: Eliminate warning for uninitialized value.
John Zulauf [Thu, 12 Apr 2018 19:15:47 +0000 (13:15 -0600)]
loader: Eliminate warning for uninitialized value.

Added default value to severity to kill a Linux warning.

Change-Id: Iaf3e62a0fa01d74874aaec4951f9a2aa38479ca0

6 years agolayers: Sort extension order for extension helper
John Zulauf [Tue, 10 Apr 2018 19:12:34 +0000 (13:12 -0600)]
layers: Sort extension order for extension helper

Sorted the extensions by name s.t. the output of the vk_extension_helper
generator would be consistent run-to-run.

Change-Id: Ief3d822b91260e469f7f2d563076d8a79f1a1bf0

6 years agoImage bind count is associated with pImageBinds rather than opaque binds
rodneyhuff [Tue, 24 Apr 2018 18:21:53 +0000 (11:21 -0700)]
Image bind count is associated with pImageBinds rather than opaque binds

6 years agotests: Workaround crash in PSOPolygonModeValid
Karl Schultz [Tue, 24 Apr 2018 16:46:29 +0000 (10:46 -0600)]
tests: Workaround crash in PSOPolygonModeValid

This test has been crashing in some versions of Linux nvidia drivers.
Crash occurs in vkCreateGraphicsPipelines.

works: 375.27.14
fails: 387.42.03

This test sets rasterizerDiscardEnable to true as part of creating
a graphics pipeline. Setting it to false allows the test to pass.
The test also passes if no fragment shader is provided for the pipeline.

Several other tests set rasterizerDiscardEnable to true, but they
do not crash since they are negative tests and the call to
vkCreateGraphicsPipelines probably doesn't make it to the driver.

There's one other positive test that sets rasterizerDiscardEnable
to true, but it doesn't supply a fragment shader.

Since whether a crash occurs or not depends on the driver version
and because turning on discard isn't part of the test's goals, it
seems best to just turn off discard.

I've submitted a bug report to the vendor.

Change-Id: If1b3ee2db88ee5701bb731b96dcaa45d6bdcb287

6 years agoheader: Update to version 1.1.74 of Vulkan hdr
Mark Lobodzinski [Tue, 24 Apr 2018 15:58:32 +0000 (11:58 -0400)]
header: Update to version 1.1.74 of Vulkan hdr

- update layer json files
- update vulkan_core.h
- update vk.xml
- update vulkan.hpp
- update validusage.json
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- maintain local changes to reg.py

Change-Id: If0c52d13f78ddfcc7c9d316386c0d20399e97668

6 years agolayers: Add handling for NULL in core post call
Jeremy Kniager [Mon, 23 Apr 2018 22:55:00 +0000 (16:55 -0600)]
layers: Add handling for NULL in core post call

Added handling in
PostCallRecordGetImageSparseMemoryRequirements2
when a nullptr is passed to 'reqs'

Change-Id: I444ec733d4a172329aceb0fcbb68568700b8f535

6 years agolayers: Fixes from PR #2566
Eskil Sund [Thu, 19 Apr 2018 14:25:20 +0000 (16:25 +0200)]
layers: Fixes from PR #2566

6 years agolayers: Add VALIDATION_ERROR_32a00272
Eskil Sund [Fri, 6 Apr 2018 14:56:32 +0000 (16:56 +0200)]
layers: Add VALIDATION_ERROR_32a00272

This adds VALIDATION_ERROR_32a00272 to core validation layer to catch
reset of descriptor pool in-flight. Also adding an accompanying test
case and an update of the validation layer database to reflect new
validation and test.

6 years agobuild(win): Add dep to create dir before use
Karl Schultz [Fri, 20 Apr 2018 16:49:41 +0000 (10:49 -0600)]
build(win): Add dep to create dir before use

Add a CMake dependency for Windows builds to create
the layers/$CONFIG directory before running any of the
other steps that copy the layer json files to this directory.

This failure was sporadic and often did not fail because
other build steps that compiled the layers often created this
directory before the copy steps executed.

Because of the difficulty in reproducing this problem, it is not
certain that this fixes the problem.  However, the mac Xcode
builds were already using this pattern to achieve the same goal.

6 years agolayers: Validate against nonCoherentAtomSize
Tony Barbour [Thu, 19 Apr 2018 17:41:36 +0000 (11:41 -0600)]
layers: Validate against nonCoherentAtomSize

FlushMappedMemoryRanges and InvalidateMappedMemoryRanges check
size and offset against nonCoherentAtomSize.
Github issues 329 & 2584
Gitlab Issue 611

Change-Id: I4cbc6c21f6fe4b6187b381b2565a90c61417bee5

6 years agoloader: Fix a 1.0/1.1 versioning bug
Lenny Komow [Thu, 19 Apr 2018 19:20:22 +0000 (13:20 -0600)]
loader: Fix a 1.0/1.1 versioning bug

Fix a bug where when mixing a 1.0 and a 1.1 driver, if the loader
stores the 1.0 driver first, the apiVersion field in vkCreateInstance
will be rewritten to 1.0 for both drivers. Now it will only be
changed for the 1.0 driver, as intended.

Change-Id: I9e7c5e0b0b7c0eb660082319dcddd9e8ef8adc61

6 years agoscripts: Add spec.py check for ext changes
Mike Schuchardt [Fri, 6 Apr 2018 03:45:23 +0000 (21:45 -0600)]
scripts: Add spec.py check for ext changes

When the surrounding asciidoctor conditionals of a VUID change it may
impact validation even if the VUID text does not change.  Detect this in
spec.py and flag for manual intervention.

Change-Id: Idf802955ba9bbfe911edd4114fb28bdddf5fcc9b

6 years agodemos: Enable all required exts for present caps
Mike Schuchardt [Wed, 18 Apr 2018 22:06:52 +0000 (16:06 -0600)]
demos: Enable all required exts for present caps

vkGetDeviceGroupPresentCapabilitiesKHR requires VK_KHR_SURFACE and VK_KHR_SWAPCHAIN
in addition to VK_KHR_DEVICE_GROUP

6 years agoloader: Clarify loader warning
Mark Young [Wed, 18 Apr 2018 21:23:43 +0000 (15:23 -0600)]
loader: Clarify loader warning

Clarify several loader warnings about layers so that they include
the name of the layer that is causing an issue.

Change-Id: Ie48d73f6cc8466c3114597831fef451b3ab32bf7

6 years agomacos: Specify deployment target version
Karl Schultz [Wed, 18 Apr 2018 17:46:21 +0000 (11:46 -0600)]
macos: Specify deployment target version

This allows using the build on macOS 10.12 even if built on 10.13.

Change-Id: I21939163551bb9a0d0088513a23dc5d2cf7f5206

6 years agoscripts:Account for extnumber key to fix warnings
Tobin Ehlis [Tue, 17 Apr 2018 16:09:48 +0000 (10:09 -0600)]
scripts:Account for extnumber key to fix warnings

With the addition of the 'extnumber' key update comparison to skip over
the extnumber as well as extname in order to avoid a bunch of
irrelevant warnings.

6 years agodemos:Add const to fix build warning
Tobin Ehlis [Tue, 17 Apr 2018 16:06:48 +0000 (10:06 -0600)]
demos:Add const to fix build warning

Explicit "const" for ppEnabledExtensionNames to fix build warning.

fixup

6 years agoloader:Fix build warnings
Tobin Ehlis [Tue, 17 Apr 2018 16:05:20 +0000 (10:05 -0600)]
loader:Fix build warnings

Add "fall through" comments on intentional fall through switch cases to
avoid compiler warnings.

6 years agotests:Update 2nd CB test to change rect value
Tobin Ehlis [Tue, 17 Apr 2018 22:15:01 +0000 (16:15 -0600)]
tests:Update 2nd CB test to change rect value

Modify ConfirmNoVLErrorWhenVkCmdClearAttachmentsCalledInSecondaryCB
positive test to change the rect value after the call to
vkCmdClearAttachments() in the secondary command buffer but before the
secondary CB is executed in vkCmdExecuteCommands().
This exposes a previous bug in validation layers where the pointer to
the VkClearRect was copied, but not the underlying rect itself.

6 years agolayers:Capture rect by value to validate 2nd cb
Tobin Ehlis [Tue, 17 Apr 2018 22:14:26 +0000 (16:14 -0600)]
layers:Capture rect by value to validate 2nd cb

Fixes #2587

The lambda function was only capturing the pRect pointer by value so
the underlying rect value could still be changed between when the
command was submitted to a secondary CB and when the rect was validated
at CmdExecuteCommands() time.

Copy the actual rect value so that it can't change.

6 years agolayers: Validate subpass dependency access vs stage masks
Chris Forbes [Mon, 16 Apr 2018 01:31:06 +0000 (18:31 -0700)]
layers: Validate subpass dependency access vs stage masks

6 years agodemos: Remove undesirable gpu_count assert
Petr Kraus [Sat, 14 Apr 2018 12:45:17 +0000 (14:45 +0200)]
demos: Remove undesirable gpu_count assert

to allow the useful error message to be shown instead

6 years agolayers:Update comments to avoid compiler warnings
Tobin Ehlis [Fri, 13 Apr 2018 21:24:13 +0000 (15:24 -0600)]
layers:Update comments to avoid compiler warnings

The simple "// fall through" comment causes the compiler to omit a
warning.

6 years agoloader: Bump loader copyright to 2018
Lenny Komow [Tue, 17 Apr 2018 02:09:48 +0000 (20:09 -0600)]
loader: Bump loader copyright to 2018

Change-Id: I59b80b7f4bff37ac15fd30acc3f4600164afee90

6 years agodemos: Add vulkaninfo.rc file
Lenny Komow [Tue, 17 Apr 2018 02:08:05 +0000 (20:08 -0600)]
demos: Add vulkaninfo.rc file

Add an rc file for vulkaninfo, which allows the version number and
copyright to be encoded into the file. This is necessary to support
new runtime installer changes.

Change-Id: I95a1b4338e3071162cca028d75b7dbd5a35d0393

6 years agoexternals: Update to latest glslang
Lenny Komow [Mon, 16 Apr 2018 21:54:32 +0000 (15:54 -0600)]
externals: Update to latest glslang

Change-Id: I06c15a028941fc60bd6ddcd830a8401d83193753

6 years agovulkaninfo: Fix array length skew
Jeremy Kniager [Wed, 4 Apr 2018 22:02:33 +0000 (16:02 -0600)]
vulkaninfo: Fix array length skew

Added new struct pNextChainBuildingBlockInfo
to store sType and memory size of structs for
function buildpNextChain.

Change-Id: Ia49084d2e303336f0305a68303edaaf60f74d669

6 years agovulkaninfo: Add core 1.1 extensions
Jeremy Kniager [Fri, 30 Mar 2018 21:03:25 +0000 (15:03 -0600)]
vulkaninfo: Add core 1.1 extensions

Added support for the following extensions:

VK_KHR_multiview
VK_KHR_device_group
VK_KHR_device_group_creation

Change-Id: I103fd988518339f95f0eeb7e7408ef49dec8ec22

6 years agomacos: Pass argc/argv through to main cube code
Karl Schultz [Sat, 14 Apr 2018 00:02:07 +0000 (18:02 -0600)]
macos: Pass argc/argv through to main cube code

This allows users to specify arguments like "--c 100"

6 years agoheader: Update to version 1.1.73 of the Vulkan hdr
Mark Lobodzinski [Mon, 16 Apr 2018 14:15:59 +0000 (08:15 -0600)]
header: Update to version 1.1.73 of the Vulkan hdr

- update json files
- update vk.xml
- update vulkan_core.h
- update validusage.json
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp
- removed checks for the following deprecated VUIDs related to
  ImageCreateInfo and FormatProperties:
  - VALIDATION_ERROR_09e007ae
  - VALIDATION_ERROR_09e007b4
  - VALIDATION_ERROR_09e007ac
  - VALIDATION_ERROR_09e007a6
  - VALIDATION_ERROR_09e007b2
  - VALIDATION_ERROR_09e007a4
  - VALIDATION_ERROR_09e007aa
  - VALIDATION_ERROR_09e007a8
  - VALIDATION_ERROR_09e007a2
  - VALIDATION_ERROR_09e007b0
- modified CreateImageFormatSupportErrors test to remove killed checks
- modified ImageLayerUnsupportedFormat test to remove killed check

Change-Id: I8f1577747d87fdeb6f68b9db0340443a83c44630

6 years agolayers: fix PR2567 formatting errors
Dave Houlton [Fri, 13 Apr 2018 21:04:35 +0000 (15:04 -0600)]
layers: fix PR2567 formatting errors

Change-Id: Id7c479d7a2421c468990125dcfe815363a440a39

6 years agolayers: add setIndex to log_msg output in ValidateDrawState()
Cort [Sat, 14 Apr 2018 19:17:59 +0000 (12:17 -0700)]
layers: add setIndex to log_msg output in ValidateDrawState()

6 years agoicd:Add new physical device query funcs to ICD
Tobin Ehlis [Fri, 13 Apr 2018 19:14:59 +0000 (13:14 -0600)]
icd:Add new physical device query funcs to ICD

Add mock ICD support for vkGetPhysicalDeviceSurfacePresentModesKHR,
vkGetPhysicalDeviceSurfaceFormats[2]KHR,
vkGetPhysicalDeviceSurfaceSupportKHR,
vkGetPhysicalDeviceSurfaceCapabilities[2]KHR,
vkGetSwapchainImagesKHR and
vkAcquireNextImagesKHR.

6 years agotests: Fix typos in layer_validation_tests.cpp
Mark Lobodzinski [Fri, 13 Apr 2018 16:46:48 +0000 (10:46 -0600)]
tests: Fix typos in layer_validation_tests.cpp

Includes fixing a corresponding typo in a descriptor_sets log_msg call.

Change-Id: Ib876482357ff2b945fe411fbef68d421fdbfc802

6 years agoDon't clobber immutable samplers in update
Chris Forbes [Fri, 13 Apr 2018 16:34:15 +0000 (09:34 -0700)]
Don't clobber immutable samplers in update

The copy cases were already doing the right thing; the basic updates
missed the check for the sampler being immutable.

Fixes #2569

6 years agolayers: Add support for VK_EXT_descriptor_indexing
Jeff Bolz [Tue, 10 Apr 2018 19:32:18 +0000 (14:32 -0500)]
layers: Add support for VK_EXT_descriptor_indexing

Change-Id: Ieeaf9cbdff1c9b383d4f47ef678fe4a7467113cb

6 years agoandroid: Add GetPhysDevFeatures2 to vulkan_wrapper
Mark Lobodzinski [Fri, 13 Apr 2018 16:10:13 +0000 (10:10 -0600)]
android: Add GetPhysDevFeatures2 to vulkan_wrapper

Change-Id: I186def1470aa0423f9bde273860df3c01bf1d4f4

6 years agotravis: Avoid empty Travis CI job
Mark Lobodzinski [Thu, 12 Apr 2018 20:55:54 +0000 (14:55 -0600)]
travis: Avoid empty Travis CI job

Change-Id: Ifb917ab3cf72f0c89f3c7bc9b647156bf1259a50

6 years agolayers: maint2 image usage bit validation
Dave Houlton [Tue, 10 Apr 2018 22:41:14 +0000 (16:41 -0600)]
layers: maint2 image usage bit validation

Add partial support for VK_IMAGE_CREATE_EXTENDED_USAGE_BIT in
vkCreateImage(), currently just avoiding the usage bit checks when
EXTENDED_USAGE is specified. Full support will require an
exhaustive search of all compatible format's usage bits, which
seems pretty expensive. TODO for now.

Adds support for checking for a chained VkImageViewUsageCreateInfo
struct when doing usage bit validation in vkCreateImageView().

Change-Id: I79a5853dc93dfa54040ace162170f1226a978c2d

6 years agodemos: Remove unused var from vulkaninfo
Karl Schultz [Thu, 12 Apr 2018 19:39:59 +0000 (13:39 -0600)]
demos: Remove unused var from vulkaninfo

Change-Id: I31c161117ec773240df006cac4e06dffff05c7c6

6 years agotravis: Set up to test commit messages
Mark Lobodzinski [Mon, 9 Apr 2018 21:28:28 +0000 (15:28 -0600)]
travis: Set up to test commit messages

Change-Id: I64adcdb59329eed77cd7c0dd4ff89362f73f72f4

6 years agoscripts: Add commit message format checker
Mark Lobodzinski [Mon, 9 Apr 2018 21:27:15 +0000 (15:27 -0600)]
scripts: Add commit message format checker

Change-Id: I94efe0326e3f68e19af605a1ff381da59d2d7d1d

6 years agolayers: use VUID in ValidateImageAspectLayout log msg
Cort Stratton [Tue, 10 Apr 2018 21:52:49 +0000 (14:52 -0700)]
layers: use VUID in ValidateImageAspectLayout log msg

This commit also updates the corresponding test to expect
the VUID instead of a log message snippet.