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

7 years agolayers: Update EXT_debug_report version
Mark Young [Thu, 11 May 2017 22:04:07 +0000 (16:04 -0600)]
layers: Update EXT_debug_report version

Update the EXT_debug_report revision reported by each of the
layer's via their JSON files.

Change-Id: Ie5891ae89b61fe4588edfef593a7885298050de3

7 years agolayers: GH1720 Migrate swapchain queue checks
Petr Kraus [Wed, 10 May 2017 23:05:16 +0000 (01:05 +0200)]
layers: GH1720 Migrate swapchain queue checks

fixes #1720

7 years agolayers: Update DeviceQueueCreate checks
Petr Kraus [Mon, 8 May 2017 21:45:36 +0000 (23:45 +0200)]
layers: Update DeviceQueueCreate checks

- remove some potential false-positives from QF check
- update error db with existing check
- use error db unique codes on existing checks
- move check that need state to core_validation
- deal with VK_QUEUE_FAMILY_IGNORED case
- improve error messages texts
- make messages return appropriate object
- move code that looks displaced to appropriate places
- add locks

7 years agolayers: Validate pOffsets in vkCmdBindVertexBuffers
Tony Barbour [Wed, 10 May 2017 17:14:03 +0000 (11:14 -0600)]
layers: Validate pOffsets in vkCmdBindVertexBuffers

Change-Id: Ie618d7657af6eca555050507a623be02af2e21fe

7 years agotests: Add test for new barrier layout VU check
Mark Lobodzinski [Wed, 10 May 2017 19:19:02 +0000 (13:19 -0600)]
tests: Add test for new barrier layout VU check

And updated the error database.

Change-Id: Ifa9e073689ff83f4cd3a37eb2cd7b8c39b7003eb

7 years agolayers: LX652, Layout check for pipelinebarrier in RP
Mark Lobodzinski [Wed, 10 May 2017 15:46:30 +0000 (09:46 -0600)]
layers: LX652, Layout check for pipelinebarrier in RP

Covers VU 2080, oldlayout must equal newlayout if barrier in an
active renderPass.

Change-Id: I2bfbd27a5938615d9274ecea8799451b5134f237

7 years agolayers: Move null check in ValidateBarriers
Mark Lobodzinski [Wed, 10 May 2017 15:34:13 +0000 (09:34 -0600)]
layers: Move null check in ValidateBarriers

The check for a non-null pointer was placed well after its first use.
Moved earlier to catch null ptr refs in all of the routine.

Change-Id: Iefc9a41c9c65d3b9f9524d13d585266d22b4ba54

7 years agolayers: Fix unique_objects_wrappers.h
Mark Young [Tue, 9 May 2017 19:19:04 +0000 (13:19 -0600)]
layers: Fix unique_objects_wrappers.h

The unique_objects_wrappers.h header was generated with code that
caused several compilation warnings.  This resolves those warnings.

Change-Id: I5ed3bdb6bbe7df48b3fe6fb6679916161b32fdfd

7 years agoloader: Add basic phys dev props emulation
Lenny Komow [Wed, 10 May 2017 16:06:13 +0000 (10:06 -0600)]
loader: Add basic phys dev props emulation

Add the ability for the loader to emulate the commands in
VK_KHR_get_physical_device_properties2. This will only be used when
using multiple physical devices where only one supportes the ext.

Change-Id: I596c8ee9eea5e5136e5b478508abb21c5d8ad5a1

7 years agoloader : gh1675 - Further strncat changes
Mark Young [Tue, 25 Apr 2017 14:08:29 +0000 (08:08 -0600)]
loader : gh1675 - Further strncat changes

This doesn't completely satisfy GH 1675, but at least resolves a
few of the holes discovered by @randomascii.

Change-Id: Idb2273851e36d4470d2f14cb09d6ac1c314497a8

7 years agolayers: GH1739, Add check for shader binary size
Mark Lobodzinski [Tue, 9 May 2017 21:54:16 +0000 (15:54 -0600)]
layers: GH1739, Add check for shader binary size

VU 2816 says size must be a multiple of 4.

Change-Id: I38749fe44e02cac4e40aa572c4e4ccec01d82279

7 years agolayers: Fix build dependency
Mark Young [Wed, 10 May 2017 15:51:18 +0000 (09:51 -0600)]
layers: Fix build dependency

The no-dependency layer's still need to have a dependency in order
for the commands to execute in the proper order.  So, just tied them
to the utils object.

Change-Id: Ic279dcf86b8f0e551b194a6b5688ea646b00cc5f

7 years agolayers: Modify PV to ignore FORMAT_NOT_SUPPORTED
Mark Lobodzinski [Tue, 9 May 2017 20:07:02 +0000 (14:07 -0600)]
layers: Modify PV to ignore FORMAT_NOT_SUPPORTED

This return code is now ignored by the Get*ImageFormatProperties*
APIs. Printing a message for this usage was just noisy.

Change-Id: I0cbd1b1a4cfa4761092a647d7912b1d590fcc89b

7 years agolayers: Add exclusion list to validate_result in PV
Mark Lobodzinski [Tue, 9 May 2017 19:49:59 +0000 (13:49 -0600)]
layers: Add exclusion list to validate_result in PV

Allows specifying return codes to ignore in parameter validation.

Change-Id: Iebf11920c3921c39190903b2750f4b3d61fe6242

7 years agolayers: Add vkCreateRenderPass subpass attachment VUs
Cort Stratton [Thu, 4 May 2017 22:18:52 +0000 (15:18 -0700)]
layers: Add vkCreateRenderPass subpass attachment VUs

7 years agoloader: Optimize layer removal
Mark Young [Tue, 9 May 2017 21:23:33 +0000 (15:23 -0600)]
loader: Optimize layer removal

In the case we remove a meta-layer, use memmove once, not in an
array.

Change-Id: Ia7496c4436e987011a0ad504a096c15f9d320c28

7 years agolayers: LX673, CreateWin32Surface Null HWND check
Mark Lobodzinski [Tue, 9 May 2017 14:21:15 +0000 (08:21 -0600)]
layers: LX673, CreateWin32Surface Null HWND check

Added NULL check to parameter validation, and assigned VU2505.
All we can do is check for Null. Apparently, hInstance CAN be NULL.

Change-Id: Ica5ead0514b7435ea9428dbd0018f53ff25462fd

7 years agolayers: Remove default ctors for {Image,}SamplerDescriptor
Chris Forbes [Tue, 9 May 2017 15:51:38 +0000 (08:51 -0700)]
layers: Remove default ctors for {Image,}SamplerDescriptor

These just added confusion; we already support the !immut case in the other
ctor.

V2: ImageSamplerDescriptor remaining ctor was buggy.

7 years agolayers: Don't start ImageSamplerDescriptor w/ immut as updated.
Chris Forbes [Mon, 8 May 2017 23:34:32 +0000 (16:34 -0700)]
layers: Don't start ImageSamplerDescriptor w/ immut as updated.

This descriptor is NOT initially updated; it's invalid until the Image
component is set.

7 years agolayers: Don't skip validating image part of combined image+immut sampler
Chris Forbes [Mon, 8 May 2017 20:54:50 +0000 (13:54 -0700)]
layers: Don't skip validating image part of combined image+immut sampler

This early out was from another time...

7 years agoloader: Code review fixes
Mark Young [Tue, 9 May 2017 16:31:12 +0000 (10:31 -0600)]
loader: Code review fixes

Fix some potential issues discovered by Karl in the code review.

Also, fix CMake warning on newly added VkLayer_standard_layer.
The CMake generation code I had been using expected a project with
the same name as the JSON.

Change-Id: I8738ff03ac08bcfc13aa8d11c570a0b507de450a

7 years agoloader: Update meta-layers
Mark Young [Fri, 5 May 2017 17:17:17 +0000 (11:17 -0600)]
loader: Update meta-layers

Use the meta-layer Manifest API version to check against each
of its component layer API versions.  This will force us to
make sure each JSON file is properly updated in sync.

Add a section to the LoaderAndLayerInterface markdown doc about
the usage of meta-layers, and an example of how they look in a
Manifest JSON file.

Change-Id: I667cfd3013cbcf201c83935dc6f1c2bb937c7742

7 years agoloader: Fix layer Enumerate bug
Mark Young [Thu, 4 May 2017 18:16:35 +0000 (12:16 -0600)]
loader: Fix layer Enumerate bug

This fixes a bug found by Timothee Besset regarding calling
vkEnumerateDeviceLayerProperties when no layers are present.  This
resulted in a negative number being filled into a uint32_t which
caused an invalid number of layers to be returned.

Now that we have meta-layers implemented instead of hard-coded,
I created two lists: an application provided list of layers, and
an expanded list of layers (where meta-layers are broken up into
their component layers).  The former is used when working with the
enumerate calls, but the later is used internally for final layer
activation.

Change-Id: If723fdfb5acb1dc57923282d2c641c582870ad1c

7 years agoloader: Meta-layer support
Mark Young [Tue, 2 May 2017 16:49:46 +0000 (10:49 -0600)]
loader: Meta-layer support

Integrate Lenny and my changes for Meta-layers.
Includes adding initial JSON file for standard_validation.

Change-Id: Ibc1da464fad4949e14e171dbc7dd9990621e1081

7 years agolayers:Fix cut-and-paste bug
Tobin Ehlis [Tue, 9 May 2017 16:22:14 +0000 (10:22 -0600)]
layers:Fix cut-and-paste bug

From Mikko at Unity, there was a cut-and-paste bug here where color
counts were being used to check input attachments. Use input counts
instead.

7 years agoloader: gh1661 - Phys dev exts not loading
Lenny Komow [Mon, 8 May 2017 20:38:08 +0000 (14:38 -0600)]
loader: gh1661 - Phys dev exts not loading

Fix a bug whereby commands from physical device extensions were
not being written to the instance extension dispatch table,
preventing their terminators from ever being run.

Change-Id: I38dab0ae6463674f2a1f572bc0ee1eebe8d0dd13

7 years agolayers:Immutable samplers are updated at creation
Tobin Ehlis [Mon, 8 May 2017 17:24:57 +0000 (11:24 -0600)]
layers:Immutable samplers are updated at creation

Fixes #1741

Descriptors with immutable samplers are updated at the time they're
created. Set update bool for descriptor sets with immutable samplers
at the time they're created. This will prevent false positives.

7 years agolayers: Remove unhelpful precheck in ValidateDrawState
Chris Forbes [Mon, 8 May 2017 17:58:00 +0000 (10:58 -0700)]
layers: Remove unhelpful precheck in ValidateDrawState

7 years agotests: Add test for graphics pipelines with tessellation
Cort Stratton [Fri, 5 May 2017 23:02:35 +0000 (16:02 -0700)]
tests: Add test for graphics pipelines with tessellation

7 years agolayers: check for both TE and TC, not just TC
Cort Stratton [Thu, 27 Apr 2017 14:26:47 +0000 (16:26 +0200)]
layers: check for both TE and TC, not just TC

7 years agolayers: Add VkVertexInputAttributeDescription VUs
Jeremy Hayes [Fri, 5 May 2017 00:10:28 +0000 (18:10 -0600)]
layers: Add VkVertexInputAttributeDescription VUs

Also fix GH#1709.

Change-Id: I62394dc34cb92aa4308eb84cf7a0d62403e7a9e7

7 years agolayers: Add VkVertexInputBindingDescription VUs
Jeremy Hayes [Fri, 5 May 2017 00:08:49 +0000 (18:08 -0600)]
layers: Add VkVertexInputBindingDescription VUs

Change-Id: Id9cb603dce7a49b21f9f8252baef692b4f6787f7

7 years agoloader: gh1693 - GPDA override not used
Mark Young [Thu, 4 May 2017 21:10:59 +0000 (15:10 -0600)]
loader: gh1693 - GPDA override not used

In some situations, the loader wouldn't directly use the
GetInstanceProcAddr or GetDeviceProcAddr function overrides directly.
Instead, the loader would call vkGetInstanceProcAddr with an
argument of "vkGetInstanceProcAddr" and vkGetDeviceProcAddr with an
argument of "vkGetDeviceProcAddr".  This short-cuts that.

NOTE: Layers still need to support these queries because if another
layer is above you, it may call "vkGetInstanceProcAddr" with
to get "vkGetDeviceProcAddr".

Change-Id: I810945f45121d42d23b69d0b3334d6bad3a8ed2f

7 years agolayers: Fix incorrect VU ID
Mike Schuchardt [Fri, 5 May 2017 15:35:07 +0000 (09:35 -0600)]
layers: Fix incorrect VU ID

Change-Id: Ifc751f1ece6cfd5b6ab02d63081af6acbb2c56e8

7 years agolayers: Move patchControlPoints validation
Mike Schuchardt [Wed, 26 Apr 2017 21:25:23 +0000 (15:25 -0600)]
layers: Move patchControlPoints validation

Move pTessellationState->patchControlPoints checks to parameter
validation where they will only be executed if the pipeline contains
tessellation stages.

Change-Id: I271f915625995f4a54045d0abe63ce27b9e023f9

7 years agolayers: Pipeline creation conditional validation
Mike Schuchardt [Wed, 26 Apr 2017 20:41:38 +0000 (14:41 -0600)]
layers: Pipeline creation conditional validation

1.0.47 added language to spec about when arguments to
vkCreateGraphicsPipelines are ignored.  Only perform validation on
pTessellationState when both tessellation control and evaluation shader
stages are present.  Only perform validation on pViewportState,
pMultisampleState, pDepthStencilState, pColorBlendState when
rasterization is enabled.

Change-Id: I23e1880d73723189adea32ef9d6ec3b2c3ac689c

7 years agolayers: Correct error db of VkDeviceQueueCreateInfo
Petr Kraus [Thu, 4 May 2017 15:59:44 +0000 (17:59 +0200)]
layers: Correct error db of VkDeviceQueueCreateInfo

- validation cmd is vkCreateDevice not Destroy
- non-implicit checks are implemented,
just didn't use the unique codes

7 years agodocs: Update loader doc for linking and format
Lenny Komow [Thu, 4 May 2017 20:50:01 +0000 (14:50 -0600)]
docs: Update loader doc for linking and format

Change-Id: Id51ce907ca167a44f9f2db6db48b4ade679b129b

7 years agoRevert "Fix location of vk_layer_settings.txt on Android"
Cody Northrop [Thu, 4 May 2017 16:16:46 +0000 (10:16 -0600)]
Revert "Fix location of vk_layer_settings.txt on Android"

This reverts commit 3d22f33e862d4bed46edbd5ee948f4ebe9c84a6f.

7 years agoFix location of vk_layer_settings.txt on Android
Christian Forfang [Thu, 4 May 2017 13:26:51 +0000 (15:26 +0200)]
Fix location of vk_layer_settings.txt on Android

Commit 969ab0680dd434f0 ('api_dump: Support config file and logging on Android')
added a custom location for vk_layer_settings.txt on Android. However, commit
750837a5dedf524c81c (Merge branch 'trunk') ended up partly overwriting these changes,
breaking the functionality.

As a result, using the config file on Android hasn't worked since October 2016. This commit
restores the changes in the original commit to fix this.

7 years agolayers: Add missed entries for some nv extensions
Chris Forbes [Wed, 3 May 2017 15:21:33 +0000 (08:21 -0700)]
layers: Add missed entries for some nv extensions

Nothing uses these, so I didn't notice they weren't set up.

7 years agolayers: Don't generate T* = reinterpret_cast(T*) new T()
Chris Forbes [Wed, 3 May 2017 01:36:39 +0000 (18:36 -0700)]
layers: Don't generate T* = reinterpret_cast(T*) new T()

No need for the cast, these types already line up.

7 years agolayers: use Unwrap in UO codegen
Chris Forbes [Wed, 3 May 2017 01:35:12 +0000 (18:35 -0700)]
layers: use Unwrap in UO codegen

7 years agolayers: use WrapNew in UO codegen
Chris Forbes [Wed, 3 May 2017 01:25:30 +0000 (18:25 -0700)]
layers: use WrapNew in UO codegen

7 years agolayers: Move UO helpers to header
Chris Forbes [Wed, 3 May 2017 01:18:01 +0000 (18:18 -0700)]
layers: Move UO helpers to header

7 years agolayers: UO: rework GetDisplayPlaneCapabilitiesKHR
Chris Forbes [Wed, 3 May 2017 00:48:20 +0000 (17:48 -0700)]
layers: UO: rework GetDisplayPlaneCapabilitiesKHR

Not sure what this was trying to achieve -- we should have seen every
VkDisplayMode as a return from GetDisplayModePropertiesKHR?

7 years agolayers: Rework UO GetDisplayModePropertiesKHR
Chris Forbes [Wed, 3 May 2017 00:45:45 +0000 (17:45 -0700)]
layers: Rework UO GetDisplayModePropertiesKHR

Similar overkill to function fixed in earlier commit

7 years agolayers: Mark bogus looking reverse lookup in UO
Chris Forbes [Wed, 3 May 2017 00:45:29 +0000 (17:45 -0700)]
layers: Mark bogus looking reverse lookup in UO

7 years agolayers: Fix UO GetPhysicalDeviceDisplayPlanePropertiesKHR
Chris Forbes [Wed, 3 May 2017 00:36:57 +0000 (17:36 -0700)]
layers: Fix UO GetPhysicalDeviceDisplayPlanePropertiesKHR

This was doing odd things. pProperties is an output-only array. Its
contents are undefined before the call, so we shouldn't be trying to
unwrap the handles in there. We don't even need the safe_* here.

7 years agolayers: Use helpers in most swapchain UO impls
Chris Forbes [Wed, 3 May 2017 00:36:28 +0000 (17:36 -0700)]
layers: Use helpers in most swapchain UO impls

7 years agolayers: Write helpers for UO Unwrap+WrapNew operations
Chris Forbes [Wed, 3 May 2017 00:35:26 +0000 (17:35 -0700)]
layers: Write helpers for UO Unwrap+WrapNew operations

Allows us to concentrate all the ID generation and cast insanity in one
place.

7 years agolayers: Store instance data in UO::layer_data rather than gpu handle
Chris Forbes [Tue, 2 May 2017 23:54:24 +0000 (16:54 -0700)]
layers: Store instance data in UO::layer_data rather than gpu handle

7 years agolayers: Use InstanceExtensions support in UO
Chris Forbes [Tue, 2 May 2017 23:50:35 +0000 (16:50 -0700)]
layers: Use InstanceExtensions support in UO