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

6 years agolayers: add level/layer to ValidateImageAspectLayout log msg
Cort Stratton [Tue, 10 Apr 2018 21:52:49 +0000 (14:52 -0700)]
layers: add level/layer to ValidateImageAspectLayout log msg

This helps clarify the case where a transition fails due to a
specific subresource being in an unexpected layout.

6 years agoFix missing validation errors when a CB never bound any descriptor sets
Chris Forbes [Fri, 6 Apr 2018 15:59:47 +0000 (08:59 -0700)]
Fix missing validation errors when a CB never bound any descriptor sets

In this case, the last bound state would never be properly configured
and so we'd skip over this whole block.

6 years agomacos: Remove update_and_draw from cube demos
Karl Schultz [Fri, 6 Apr 2018 21:55:59 +0000 (15:55 -0600)]
macos: Remove update_and_draw from cube demos

Adopting this change from MoltenVK.  The wait and update steps
are no longer needed.  Calling just demo_draw now works as well
on MVK as it does on other platforms.

6 years agolayers: multiplane image allow color aspect bit
Dave Houlton [Thu, 5 Apr 2018 22:20:33 +0000 (16:20 -0600)]
layers: multiplane image allow color aspect bit

There is a case (memory barrier) where a multiplane image can have
the color aspect bit set, so the general aspect check should allow
it. In the common case where only VK_IMAGE_ASPECT_PLANE_n_BIT_KHR
bits are allowed, there are specific VUIDs in place to enforce.

This fixes an "unexpected error" result that recently appeared for
the CopyImageMultiplaneAspectBits test.

Change-Id: I766da2940955d8a7b72ec26e4dbefe9e60eb0b08

6 years agoscripts: exclude vulkan headers from clang-format
Mike Schuchardt [Fri, 6 Apr 2018 04:44:05 +0000 (22:44 -0600)]
scripts: exclude vulkan headers from clang-format

Travis CI shows linux build failure on every header update because
upstream Vulkan-Docs files are not formatted with the clang-format style
of this repo.  This change excludes the vulkan headers directory from
the CI clang-format check.

Change-Id: I6d1bee486d06b690f65aa2c3098de14f3c5931c9

6 years agoheader: Update to version 1.1.72 of the Vulkan hdr
Mark Lobodzinski [Thu, 5 Apr 2018 21:46:53 +0000 (15:46 -0600)]
header: Update to version 1.1.72 of the Vulkan hdr

- updated layer json files
- updated vulkan_core.h
- updated validusage.json
- updated vk_validation_error_database.txt
- updated vk_validation_error_messages.h
- updated vuid_mapping.py
- updated vk.xml
- updated vulkan.hpp
- moved vuid 1ae00652 to 1ae00f06

Change-Id: Id6ba342841cca04c0669b7feb39d82e2b8052443

6 years agolayers: Add text-string VUID version of log_msg
Mark Lobodzinski [Wed, 21 Feb 2018 16:48:42 +0000 (09:48 -0700)]
layers: Add text-string VUID version of log_msg

Allows adding VUIDs for checks that are not yet public, or that do
not yet have numerical VUIDs assigned.

Change-Id: I9f3a92d8e085f20452a52439517e7cdf677631d3

6 years agolayers: Add text vuid error message map
Mark Lobodzinski [Tue, 3 Apr 2018 21:50:34 +0000 (15:50 -0600)]
layers: Add text vuid error message map

Change-Id: I71efc6127960a8fdff16a8279201f7e59be73bf3

6 years agoscripts: Output vuid-string->message map
Mark Lobodzinski [Tue, 27 Mar 2018 20:49:31 +0000 (14:49 -0600)]
scripts: Output vuid-string->message map

Change-Id: Id4123053da62fb8d2b4d32393d11e4aa6c030f92

6 years agolayers: fix typos
Dave Houlton [Wed, 4 Apr 2018 17:41:48 +0000 (11:41 -0600)]
layers: fix typos

Change-Id: I93a01dfe0e7f49ba3f6992a5f6c8d312b524774a

6 years agotests: Unit tests for CreateDescriptorUpdateTempla
John Zulauf [Wed, 4 Apr 2018 21:02:01 +0000 (15:02 -0600)]
tests: Unit tests for CreateDescriptorUpdateTempla

Added unit test for vkCreateDescriptorUpdateTemplate(KHR) validation
checks.

VALIDATION_ERROR_052002bc
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00350
VALIDATION_ERROR_052002be
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00351
VALIDATION_ERROR_052002c0
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00352
VALIDATION_ERROR_052002c2
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00353

Change-Id: I55bebc50757dd537f0be849aec38120fae41e181

6 years agolayers: Add checks for CreateDescriptorUpdateTempl
John Zulauf [Wed, 4 Apr 2018 20:54:11 +0000 (14:54 -0600)]
layers: Add checks for CreateDescriptorUpdateTempl

Added four validation checks for vkCreateDescriptorUpdateTemplate(KHR)
and removed a false positive.

VALIDATION_ERROR_052002bc
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00350
VALIDATION_ERROR_052002be
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00351
VALIDATION_ERROR_052002c0
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00352
VALIDATION_ERROR_052002c2
    VUID-VkDescriptorUpdateTemplateCreateInfo-templateType-00353

Updated autogen of object tracker s.t. that logic for noautovalidation
handles matches parameter validation, and spec generation, eliminating a
source of false positives.

Change-Id: Ib831eabd45a5083168355bca6b0e2beda3a76222

6 years agodocs:Fix my name spelling in README
Tobin Ehlis [Thu, 5 Apr 2018 15:30:09 +0000 (09:30 -0600)]
docs:Fix my name spelling in README

6 years agomacos: Update vulkan framework version to 1.1
Karl Schultz [Wed, 4 Apr 2018 22:15:32 +0000 (16:15 -0600)]
macos: Update vulkan framework version to 1.1

6 years agolayers: Avoid reading pointer to array when count is zero
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:44:11 +0000 (22:44 +0000)]
layers: Avoid reading pointer to array when count is zero

Take for example VkSubmitInfo. It has, amongst others, two fields:
waitSemaphoreCount and pWaitSemaphores. The specification states that
if waitSemaphoreCount is zero, the application may leave pWaitSemaphores
uninitialized (in essence, that field is ignored).

The layers read that value anyway, triggering uninitialized read errors
by memory sanitization tools.

Fixes uninitialized read in QueueSubmitSemaphoresAndLayoutTracking.

6 years agolayers: Destroy object tracking after reporting undestroyed objects
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 21:52:06 +0000 (21:52 +0000)]
layers: Destroy object tracking after reporting undestroyed objects

Fixes a memleak in VkLayerTest.LeakAnObject.

6 years agolayers: Fix memleak in unique object's debug functions
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 21:37:56 +0000 (21:37 +0000)]
layers: Fix memleak in unique object's debug functions

6 years agotests: End recording command buffer instead of resetting
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 22:15:03 +0000 (22:15 +0000)]
tests: End recording command buffer instead of resetting

Workaround a memory leak in NVIDIA's driver. Resetting a command buffer
while it's in the recording state leaks memory.

6 years agotests: End command buffer in VtxBufferBadIndex
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:38:05 +0000 (22:38 +0000)]
tests: End command buffer in VtxBufferBadIndex

6 years agotests: End command buffer in UpdateBufferWithinRenderPass
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:29:32 +0000 (23:29 +0000)]
tests: End command buffer in UpdateBufferWithinRenderPass

6 years agotests: End command buffer in RenderPassWithinRenderPass
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:37:14 +0000 (22:37 +0000)]
tests: End command buffer in RenderPassWithinRenderPass

6 years agotests: End command buffer in PushDescriptorUnboundSetTest
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:39:15 +0000 (22:39 +0000)]
tests: End command buffer in PushDescriptorUnboundSetTest

6 years agotests: End command buffer in NullRenderPass
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:28:50 +0000 (23:28 +0000)]
tests: End command buffer in NullRenderPass

6 years agotests: End command buffer in InvalidDynamicOffsetCases
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:27:51 +0000 (23:27 +0000)]
tests: End command buffer in InvalidDynamicOffsetCases

6 years agotests: End command buffer in InvalidDescriptorSetSamplerDestroyed
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:27:30 +0000 (23:27 +0000)]
tests: End command buffer in InvalidDescriptorSetSamplerDestroyed

6 years agotests: End command buffer in ImmutableSamplerOnlyDescriptor
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:38:56 +0000 (22:38 +0000)]
tests: End command buffer in ImmutableSamplerOnlyDescriptor

6 years agotests: End command buffer in FramebufferIncompatible
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:38:39 +0000 (22:38 +0000)]
tests: End command buffer in FramebufferIncompatible

6 years agotests: End command buffer in FillBufferWithinRenderPass
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:37:32 +0000 (22:37 +0000)]
tests: End command buffer in FillBufferWithinRenderPass

6 years agotests: End command buffer in DynViewportAndScissorUndefinedDrawState
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:28:30 +0000 (23:28 +0000)]
tests: End command buffer in DynViewportAndScissorUndefinedDrawState

6 years agotests: End command buffer in DynamicOffsetWithInactiveBinding
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:39:30 +0000 (22:39 +0000)]
tests: End command buffer in DynamicOffsetWithInactiveBinding

6 years agotests: End command buffer in DescriptorSetCompatibility
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:28:10 +0000 (23:28 +0000)]
tests: End command buffer in DescriptorSetCompatibility

6 years agotests: End command buffer in CmdClearAttachmentTests
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:37:49 +0000 (22:37 +0000)]
tests: End command buffer in CmdClearAttachmentTests

6 years agotests: End command buffer in ClearDepthStencilImageErrors
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:30:03 +0000 (23:30 +0000)]
tests: End command buffer in ClearDepthStencilImageErrors

6 years agotests: End command buffer in ClearColorImageWithinRenderPass
Gabríel Arthúr Pétursson [Tue, 20 Mar 2018 23:29:47 +0000 (23:29 +0000)]
tests: End command buffer in ClearColorImageWithinRenderPass

6 years agotests: End command buffer in BadVertexBufferOffset
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 22:38:22 +0000 (22:38 +0000)]
tests: End command buffer in BadVertexBufferOffset

6 years agotests: Fix copy&paste error in a comment in vkrenderframework
Gabríel Arthúr Pétursson [Wed, 21 Mar 2018 23:55:55 +0000 (23:55 +0000)]
tests: Fix copy&paste error in a comment in vkrenderframework

6 years agomacos: Add new Vulkan headers to vulkan framework
Karl Schultz [Wed, 4 Apr 2018 20:56:13 +0000 (14:56 -0600)]
macos: Add new Vulkan headers to vulkan framework

6 years agotests: Update CopyImage with sampler_YCbCr VUIDs
Dave Houlton [Thu, 8 Mar 2018 21:34:47 +0000 (14:34 -0700)]
tests: Update CopyImage with sampler_YCbCr VUIDs

Modifies existing tests and adds new tests to verify VUIDs added or
modified by the sampler_YCbCr extension. Adds some helpers to the
test framework to verify enabled extension strings.

Change-Id: Ib48f3e53ae9d78e98a5e2233019be6616afaca01

6 years agolayers: add multiplane image formats and checks
Dave Houlton [Tue, 6 Mar 2018 18:08:51 +0000 (11:08 -0700)]
layers: add multiplane image formats and checks

Add support for new formats added by sampler_YCbCr and mainlined in
Vulkan 1.1. Adds single- and multi-plane formats to lookup utility
fxns. Adds checks for CmdCopyImage VUIDS that were added or modified.

Change-Id: I70279bd8d667bf50d53fce752b53bb7e2e0a2d67

6 years agovulkaninfo: Add checks for some struct allocation
Jeremy Kniager [Mon, 2 Apr 2018 20:44:47 +0000 (14:44 -0600)]
vulkaninfo: Add checks for some struct allocation

Added checks after attempted memory allocation in
AppGpuInit and before memory frees in
AppGpuDestroy.

Change-Id: Ie2c207bfabd24bec326b12eef0c58e2bdfe8b59a

6 years agodocs: Fix internal links in BUILD.md
Karl Schultz [Wed, 4 Apr 2018 00:28:03 +0000 (18:28 -0600)]
docs: Fix internal links in BUILD.md

6 years agobuild: macOS: Adapt to changes in MoltenVK repo
Karl Schultz [Wed, 4 Apr 2018 00:26:40 +0000 (18:26 -0600)]
build: macOS: Adapt to changes in MoltenVK repo

6 years agotest: Delete dead code ApiVersion tests
John Zulauf [Mon, 2 Apr 2018 20:02:03 +0000 (14:02 -0600)]
test: Delete dead code ApiVersion tests

two of the apiVersion unit tests were too sensivite to configuration
issues and were disabled, deleted to avoid carrying dead code.

Change-Id: Ifb875dceb71e5a958c40c3f67966db4915f2d6df

6 years agotests: Added unit tests for apiVersion validations
John Zulauf [Fri, 30 Mar 2018 22:55:13 +0000 (16:55 -0600)]
tests: Added unit tests for apiVersion validations

Add three unit tests for apiVersion 0, < 1.0 and > 1.1 validation,
with the latter two disabled due to configuration sensitivity.

Change-Id: I4f40a1dc275b263ae02c2ae7ddce1b0c400092b2

6 years agotests: Add debug callbacks during CreateInstance
John Zulauf [Fri, 30 Mar 2018 20:58:00 +0000 (14:58 -0600)]
tests: Add debug callbacks during CreateInstance

Added debug callback information to CreateInstance, such that
CreateInstance validation errors can be caught in the usual way.

Change-Id: Ie734e2b2eabbc6e63fc6196a539f22e52fe00546

6 years agoloader: Improve 1.0 driver apiVersion fixup
John Zulauf [Fri, 30 Mar 2018 22:52:23 +0000 (16:52 -0600)]
loader: Improve 1.0 driver apiVersion fixup

The 1.1 loader attempts to avoid VK_ERROR_INCOMPATIBLE_DRIVER from 1.0
drivers by patching up the supplied apiVersion during CreateInstance.
Added support for apiVersions > 0 and < 1.0.

Change-Id: Iae350624c6f9f711890814b48adc3f5a17fdc47b

6 years agoloader: Eliminate duplicate validation messages
John Zulauf [Mon, 2 Apr 2018 16:55:18 +0000 (10:55 -0600)]
loader: Eliminate duplicate validation messages

Layer version mismatch validation messages were being generated multiple
times for each mismatching layer.  Eliminated duplicate error messages
and fixed formatting issues.

Change-Id: Iffc5ff94f70fefc075b74764ae87a6593143f503

6 years agolayers: Add correct validation for apiVersion
John Zulauf [Fri, 30 Mar 2018 20:51:59 +0000 (14:51 -0600)]
layers: Add correct validation for apiVersion

Update and correct validation of passed apiVersion for 1.1 specified
behavior.  Instances with apiVersion > 1.1 will be validated as 1.1
instances (and warn).  Instances with apiVersions < 0 and < 1.0 will be
validated as 1.0 instances and generate an error.  Instances with
missing or 0 apiVersions will be treated as 1.0 instances.

LOGCONSOLE warning converted to log_msg warning.

Change-Id: I2debb6175cf094918fc86cdea2973ddae9479a0b

6 years agolayers: Fix multi-plane aspect bit check
Dave Houlton [Fri, 30 Mar 2018 21:07:41 +0000 (15:07 -0600)]
layers: Fix multi-plane aspect bit check

Remove multi-plane formats from classification as 'color' formats
and add specific aspect bit checks for them.

Change-Id: Ie899a6f2a91ceb43e6fb92c3fdd9056e00849fc3

6 years agodemos: Add some cube lighting
Dave Houlton [Fri, 30 Mar 2018 23:10:17 +0000 (17:10 -0600)]
demos: Add some cube lighting

Can stand it no longer.  Added some minimal n-dot-L screen-space
lighting.

Change-Id: Ifaf664a5651f59d8904cbb064018c00d385ec3ed

6 years agolayers: Remove layer prefix from log_msg calls
Mark Lobodzinski [Sun, 1 Apr 2018 16:38:15 +0000 (10:38 -0600)]
layers: Remove layer prefix from log_msg calls

Change-Id: Iea43bd2f8f2c92d99b5fdf40abe94149a6fb860c

6 years agolayers: Remove location field from log_msg calls
Mark Lobodzinski [Fri, 30 Mar 2018 20:26:00 +0000 (14:26 -0600)]
layers: Remove location field from log_msg calls

Removed location parameters from log_msg calls, and from layer
logging output functions.

Change-Id: Ia1e2ce012997efed1db7864761ae0e39c8bc7d9b

6 years agolayers: Remove VUID spec text from log_msg strings
Mark Lobodzinski [Fri, 30 Mar 2018 16:09:03 +0000 (10:09 -0600)]
layers: Remove VUID spec text from log_msg strings

Removed format specifiers from log_msg text strings
Removed validation_error_map specifiers from log_msg parameter lists

Change-Id: I5bd22c60dabf534382ca4d371ef4dffff1829f6d

6 years agodemos: Fix call to SurfaceCapabilities2EXT
Shannon McPherson [Thu, 29 Mar 2018 17:27:39 +0000 (11:27 -0600)]
demos: Fix call to SurfaceCapabilities2EXT

VkGetPhysicalDeviceSurfaceCapabilities2EXT() requires VK_KHR_Display to
be enabled. Added VK_KHR_DISPLAY_EXTENSION_NAME to list of instance
extensions.

Change-Id: I566cb26045c18865b9c0b1a39b5f89d6d7ccb7f6

6 years agodemos: Fix format of conditionals
Shannon McPherson [Thu, 29 Mar 2018 17:38:06 +0000 (11:38 -0600)]
demos: Fix format of conditionals

Change-Id: I6c9d5d089107cb8f616084e59c0eb3f002ef2688

6 years agolayers: Correct non-dispatchable type handling
John Zulauf [Wed, 28 Mar 2018 15:55:03 +0000 (09:55 -0600)]
layers: Correct non-dispatchable type handling

Update threading layer non-dispatchable type handling to reflect updates
to the vulkan header for Linux/x32 memory model support.  Includes new
static asserts to detect future mismatches.

Change-Id: Ieb1ae335978cf43083b4a17634d06cd7066ed144

6 years agotests: Add positive tests for ownership transfers
John Zulauf [Sun, 25 Mar 2018 01:53:57 +0000 (19:53 -0600)]
tests: Add positive tests for ownership transfers

Add unit test cases for false positives regarding ownership transfers.
Specifically test the cases for ownership transfers between queue
families with mismatch queue capabilities (e.g. has graphics or not),
and for the case in which a layout is being changed during an ownership
transfer.

Change-Id: I02e4a94b5ceed26bf4b3d99066859dd47a9dd036

6 years agotests: Add access for queues objects by family
John Zulauf [Tue, 27 Mar 2018 16:12:37 +0000 (10:12 -0600)]
tests: Add access for queues objects by family

Add storage and accessors for queue objects from a vk_testing::Device
object.  Additionally, remove duplicate allocations and clean up
destruction.

Change-Id: I8d2b21cc0973ab5fb69afd854b00fb8fc56ac06a

6 years agotests: Add queue support to command buffer objects
John Zulauf [Mon, 26 Mar 2018 20:45:12 +0000 (14:45 -0600)]
tests: Add queue support to command buffer objects

Allow command buffer objects to submit to different queues than the
device default queue, and utilize the extant vk_testing classes.
New method names match the style of the class Vk*Obj method names are in
Google style, vk_testing methods are named consitently with extant
membmer functions.

Change-Id: I3461f78f92818a049c516469d2cdd1c0572d6dcc

6 years agolayers: Eliminate false positive on ownership xfer
John Zulauf [Sun, 25 Mar 2018 01:52:19 +0000 (19:52 -0600)]
layers: Eliminate false positive on ownership xfer

Add logic that correctly ignores the src(dst)StageMask for barrier
operations that are resource acquire(release) operations.  When barrier
operations transfer ownership they envitably run on two different queue
families which may have incompatible capabilities.  For release
operations dstStageMask should be ignored.  For acquire operations the
srcStageMask should be.

Note: this can only be done if *all* operations for a barrier command
are of one type, as the *StageMasks are specified at the command level.

Change-Id: I6c238ab121eaa1230e66716120d37204740408d6

6 years agolayers: Skip layout transition in release op
Chris Forbes [Mon, 21 Aug 2017 18:27:08 +0000 (11:27 -0700)]
layers: Skip layout transition in release op

6 years agolayers: Avoid a redundant CB lookup
Chris Forbes [Fri, 18 Aug 2017 22:00:48 +0000 (15:00 -0700)]
layers: Avoid a redundant CB lookup

6 years agoloader: Fix GetDeviceProcAddr with terminators
Lenny Komow [Thu, 29 Mar 2018 19:25:38 +0000 (13:25 -0600)]
loader: Fix GetDeviceProcAddr with terminators

Fix a bug where vkGetDeviceProcAddr would return a valid pointer for
any device command that used a custom terminator, even if it was part
of an extension which wasn't enabled

Change-Id: I3b088fe0c850fbaa5f7285ced81552273bc38e7e

6 years agotests: macOS CMake fixes for Xcode generator
Mike Schuchardt [Thu, 29 Mar 2018 16:12:04 +0000 (10:12 -0600)]
tests: macOS CMake fixes for Xcode generator

Put icd and test layer json files in $<CONFIG> directory when using
Xcode generator so layer tests can be executed and debugged from within
Xcode.

Change-Id: I079a89ea065ddeec98ce95766e284220c67b1859

6 years agoloader: Make assembly offsets use offsetof macro
Lenny Komow [Wed, 28 Mar 2018 20:31:32 +0000 (14:31 -0600)]
loader: Make assembly offsets use offsetof macro

Change-Id: I52d749e51e38b321d4fab4e0288c055ccdefe66f

6 years agolayers: Fix DestDescPool data race
Mark Lobodzinski [Wed, 28 Mar 2018 20:24:46 +0000 (14:24 -0600)]
layers: Fix DestDescPool data race

Data was destroyed after the down-chain call, which left the
possibility that before the items could be removed from the data
structure that they might be reused which would corrupt validation.
Fixed by destroying inside the lock before the down-chain call.

Change-Id: Icbc994ef043a1108c84474879617d4ada694b74b

6 years agolayers: Remove unnecessary destCmdPool null check
Mark Lobodzinski [Wed, 28 Mar 2018 20:20:07 +0000 (14:20 -0600)]
layers: Remove unnecessary destCmdPool null check

Change-Id: I69bb77b1874fa2148ab7902e71e57a15589ba684

6 years agolayers: Fix command buffer allocation ABA bug
Francois Duranleau [Tue, 27 Mar 2018 18:42:24 +0000 (14:42 -0400)]
layers: Fix command buffer allocation ABA bug

In core validation layer's DestroyCommandPool API entry function, the
ext layer's API call is executed outside of the lock, and before the
command pool's command buffers are erased from the layer's command
buffer map. That means that between next layer's call and the time the
lock is regained, any other thread can allocate other command buffers.
In particular, it may reuse the memory freed the command, and then the
core validation layer will not insert a new entry in the command buffer
map. So after the lock in regained and the command pool's command
buffers are erased from the map, leaving those allocated with no state,
leading to either crashes or assertions later on. The fix is to move the
release of command buffers before releasing the lock the first, before
calling the next layer's function, such that they will be removed from
the map before any other thread might reuse those addresses.

6 years agolayers: Fix gh #2504 and compiler warnings
Mark Young [Wed, 21 Mar 2018 19:35:34 +0000 (13:35 -0600)]
layers: Fix gh #2504 and compiler warnings

Remove extraneous objecgt info from the validation logging message.
Extra object logging was added accidentally in my change to
incorporate VK_EXT_debug_utils.

Fix output of Debug Utils messenger output for validation layers
to list individual objects.

Also, fixed a few compiler warnings that were appearing on Linux.

Change-Id: I043d7f734683dfa79fe7a26a5973975bde011cce

6 years agotests: Delete in-tree gtest source code
Mark Lobodzinski [Tue, 27 Mar 2018 21:16:17 +0000 (15:16 -0600)]
tests: Delete in-tree gtest source code

This is now pulled in as a submodule to LVL.

Change-Id: I7f4cbf2c2e81881545fe318a0928b0a79aeb7264

6 years agobuild: Add submodule init to update externals scripts
Mark Lobodzinski [Tue, 27 Mar 2018 21:31:16 +0000 (15:31 -0600)]
build: Add submodule init to update externals scripts

Change-Id: I78e35a0daaa5a62e432858861378543d412a77c7

6 years agotests: Switch to submodule version of gtest
Mark Lobodzinski [Tue, 27 Mar 2018 21:15:27 +0000 (15:15 -0600)]
tests: Switch to submodule version of gtest

Switch layer/loader tests over to use the submodule version of
gtest instead of the version checked into the tree.

Change-Id: I0d0bad7531ccf1de0248a48cea347471c99e179f

6 years agotests: Suppress gtest warnings
Mark Lobodzinski [Tue, 27 Mar 2018 23:13:13 +0000 (17:13 -0600)]
tests: Suppress gtest warnings

Gtest generates GCC warnings for some signed/unsigned mismatches.
Suppress this for the test output.

Change-Id: Ifa3406610e980b81e091976a062cde6457a71377

6 years agotests: Resolve gtest/xlib conflicts
Mark Lobodzinski [Tue, 27 Mar 2018 23:14:34 +0000 (17:14 -0600)]
tests: Resolve gtest/xlib conflicts

Gtest and Xlib each redefine 'None' and 'Bool', which causes
gtest compilation to fail hard. Temporarily clear the definitions
to allow gtest to build using an Xlib display server.

Change-Id: I75e53bbff9266a59ebf53a81c2e148e51de6b7c7

6 years agobuild: Add gtest as a submodule
Mark Lobodzinski [Tue, 27 Mar 2018 20:53:16 +0000 (14:53 -0600)]
build: Add gtest as a submodule

Change-Id: I9a5c440bd81f48afd24961a52595d0ca995cb7bf

6 years agoloader: Fix up missing 1.1 function exports
Lenny Komow [Mon, 12 Mar 2018 23:53:17 +0000 (17:53 -0600)]
loader: Fix up missing 1.1 function exports

6 years agoloader: Add missing core entrypoints to trampoline.c
mchock-nv [Sat, 10 Mar 2018 00:59:15 +0000 (16:59 -0800)]
loader: Add missing core entrypoints to trampoline.c

The entrypoints associated with VK_KHR_descriptor_update_template didn't
make it into the trampoline file when the extension was promoted to
core. This change adds them.

See Issue #2476

Change-Id: I676720ae152f78fbb16cda93e92cd8ced0446e03

6 years agoandroid: Start using gtest from NDK
Cody Northrop [Tue, 27 Mar 2018 18:22:53 +0000 (12:22 -0600)]
android: Start using gtest from NDK

6 years agoscripts: Remove noisy debug in codegen
Mike Schuchardt [Tue, 27 Mar 2018 20:13:24 +0000 (14:13 -0600)]
scripts: Remove noisy debug in codegen

6 years agoicd: Add json file for running on macOS
Mike Schuchardt [Mon, 26 Mar 2018 19:14:25 +0000 (13:14 -0600)]
icd: Add json file for running on macOS

6 years agolayers: fix copyimage checks broken by spec change
Dave Houlton [Mon, 26 Mar 2018 23:08:30 +0000 (17:08 -0600)]
layers: fix copyimage checks broken by spec change

Changes to 'core' spec between 1.0.68 and .71 split some CmdCopyImage
VUIDs into two.  This updates the existing checks/tests and adds test
coverage for the new VUIDs.

Change-Id: I9efd0de2c830dca5b7214168d5339bf2fd9fdf08

6 years agoValidate line width for topology reaching rasterizer rather than input
Chris Forbes [Fri, 23 Mar 2018 04:13:46 +0000 (21:13 -0700)]
Validate line width for topology reaching rasterizer rather than input

6 years agolayers: Fix CV typo in error message
Mark Lobodzinski [Mon, 26 Mar 2018 21:31:25 +0000 (15:31 -0600)]
layers: Fix CV typo in error message

GH issue #2511 -- FrameBuffer->Framebuffer.

Change-Id: Ic8de4604a7615708df9f55d5f0f0d0d7724a5d6d

6 years agoheader: Update to version 1.1.71 of the Vulkan hdr
Mark Lobodzinski [Tue, 20 Mar 2018 19:44:19 +0000 (13:44 -0600)]
header: Update to version 1.1.71 of the Vulkan hdr

- updated vulkan_core.h
- updated vulkan-android.h
- updated vk.xml
- updated validusage.json
- updated layer json files
- updated vulkan.hpp
- updated vuid_mapping.py
- marked 27 VUIDs as complete

Change-Id: Ia5abee76e5346b3a1b769664033d91403946f7a9

6 years agoscripts: Fix safe_struct Android versioning issue
Mark Lobodzinski [Sat, 24 Mar 2018 19:24:18 +0000 (13:24 -0600)]
scripts: Fix safe_struct Android versioning issue

The VK_ANDROID_external_memory_android_hardware_buffer extension uses
an android structure that is undefined before android 'O'. Worked around
this issue by defining a dummy structure for earlier android OS versions.

Change-Id: If515920d3b1707cbeb6a0377827c680d93d516ff

6 years agodocs: Move vkjson_info section from BUILD.md
Jeremy Kniager [Mon, 26 Mar 2018 19:33:19 +0000 (13:33 -0600)]
docs: Move vkjson_info section from BUILD.md

Moved the vkjson_info section from the Android
usage section in BUILD.md to its own file
libs/vkjson/README.md

Change-Id: I80ea8762c78e76fae43d2ca07820f46f7aef4c0c

6 years agodocs: Move documentation to repos
Jeremy Kniager [Fri, 23 Mar 2018 18:01:12 +0000 (12:01 -0600)]
docs: Move documentation to repos

Moved the following documentation from
LunarHub-Docs to LVL:

api_dump_layer.md
core_validation_layer.md
object_tracker_layer.md
parameter_validation_layer.md
threading_layer.md
unique_objects_layer.md

Change-Id: I448aaec1081f25468d115477748415e1a612d719

6 years agolayers: Consider storage block using new storage class to be a writable descriptor
Chris Forbes [Wed, 14 Mar 2018 16:28:35 +0000 (09:28 -0700)]
layers: Consider storage block using new storage class to be a writable descriptor

6 years agodemos: Remove logo absolute path
Shannon McPherson [Wed, 21 Feb 2018 18:41:11 +0000 (11:41 -0700)]
demos: Remove logo absolute path

Change-Id: I3949187010ddd870e4f4535b8a1d247b84cac96d

6 years agotests: Update and complete VkImage creation tests
Petr Kraus [Wed, 14 Mar 2018 18:58:16 +0000 (19:58 +0100)]
tests: Update and complete VkImage creation tests

6 years agolayers: Move sparseBinding feature vs flag check
Petr Kraus [Tue, 13 Mar 2018 11:31:39 +0000 (12:31 +0100)]
layers: Move sparseBinding feature vs flag check

6 years agolayers: Check CUBE to have 6+ layers
Petr Kraus [Tue, 13 Mar 2018 11:31:27 +0000 (12:31 +0100)]
layers: Check CUBE to have 6+ layers