platform/upstream/Vulkan-Tools.git
6 years agoicd:Add Windows def file
Tobin Ehlis [Fri, 27 Oct 2017 00:09:12 +0000 (18:09 -0600)]
icd:Add Windows def file

6 years agotests:Fix EmptyDescriptorUpdateTest test
Tobin Ehlis [Fri, 27 Oct 2017 00:03:12 +0000 (18:03 -0600)]
tests:Fix EmptyDescriptorUpdateTest test

Make sure that allocation for buffer is large enough to accommodate the
buffer's device memory requirements.
This fixes last failing test with mock. Also reran through all tests
and updating unexpected error and skipped test lists.

6 years agoicd:Get more tests passing on mock ICD
Tobin Ehlis [Thu, 26 Oct 2017 23:25:05 +0000 (17:25 -0600)]
icd:Get more tests passing on mock ICD

Modifying hard-coded minImageTransferGranularity for the queue from
{0,0,0}, which has special restrictions, to {1,1,1} which is more
lenient and removes some unexpected errors, allowing six more tests to
pass.

6 years agoicd:Limit image properties for linear images
Tobin Ehlis [Thu, 26 Oct 2017 21:21:51 +0000 (15:21 -0600)]
icd:Limit image properties for linear images

If an image is linear, return max mips, layers, and sample count of 1.

6 years agoscripts:Skip some extensions in mock ICD
Tobin Ehlis [Thu, 26 Oct 2017 20:47:51 +0000 (14:47 -0600)]
scripts:Skip some extensions in mock ICD

Mock ICD doesn't need to implement validation cache extension. Add
simple list of excluded exceptions so we can kill any cases that we
don't want in mock ICD. Initially only excludes validation cache.

6 years agotests:Fix InvalidBarriers test
Tobin Ehlis [Thu, 26 Oct 2017 19:44:46 +0000 (13:44 -0600)]
tests:Fix InvalidBarriers test

InvalidBarriers test made invalid assumption that internal size of
buffer memory was same as requested size. Update test so that when we
exceed buffer size we do that based on internal size instead of
requested size.

6 years agolayers:Kill extra whitespace in CMakeLists.txt
Tobin Ehlis [Thu, 26 Oct 2017 19:01:28 +0000 (13:01 -0600)]
layers:Kill extra whitespace in CMakeLists.txt

6 years agoicd: Adding generated mock icd
Tobin Ehlis [Fri, 13 Oct 2017 15:26:20 +0000 (09:26 -0600)]
icd: Adding generated mock icd

Initial check-in for mock icd which is being built to allow validation
testing without the need for an actual Vulkan device.

ICD is currently building and passing 324/332 tests. It creates ptr
handles for dispatchable objects and unique id handles for
non-dispatchable objects. It currently has some hard-coded values for
various Get* device-query functions in order to allow forward progress.
The long-term intention is to allow the device configuration to be set
by the test itself.

See the ICD README.md file for more info.

6 years agoheader: Update to version 1.0.65 of the Vulkan hdr
Mark Lobodzinski [Mon, 30 Oct 2017 15:35:31 +0000 (09:35 -0600)]
header: Update to version 1.0.65 of the Vulkan hdr

- update vulkan.h
- update vk.xml
- update Win/Lin json file versions
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp

Change-Id: Ib20f1955df85a31069c9ffc69c3260973b2c6633

6 years agorepo: normalize line termination across repo
Mike Weiblen [Sun, 29 Oct 2017 23:56:25 +0000 (17:56 -0600)]
repo: normalize line termination across repo

This is a scrub of the entire repo to normalize end-of-line termination to
conform to the recently added .gitattributes file.  A mismatch of line
termination can cause difficult-to-resolve conflicts when rebasing or merging.

The process performed is described at:
https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

The .gitattributes file is required because some files (*.bat and *.sh) are
sensitive to line termination.  The .gitattributes file is stored in the repo,
and overrides settings which could be corrupted by a developer's local
git configuration.  The .gitattributes file was added in f077c81

This commit completes bcc9fec, which fixed a single file.

Change-Id: I75d4594b61cb8aa6a09efb3ed5ace34fe8394871

6 years agoexternal: Update external commit IDs
Mike Weiblen [Mon, 30 Oct 2017 02:19:38 +0000 (20:19 -0600)]
external: Update external commit IDs

Update to top-of-tree glslang, plus the spirv dependencies specified by
glslang's known_good.json file.

Change-Id: I41c32e2dee320eb2cbd92f0d6a3374c643e93dd7

6 years agobuild-android: update .bat line termination
Mike Weiblen [Thu, 26 Oct 2017 23:06:35 +0000 (17:06 -0600)]
build-android: update .bat line termination

Change-Id: I9d4152df8cc7c10e74f6484dbc802c2c854c9fef

6 years agolayers: Validate push descriptor set layout count
Józef Kucia [Wed, 25 Oct 2017 20:15:22 +0000 (22:15 +0200)]
layers: Validate push descriptor set layout count

6 years agoheader: Update to version 1.0.64 of the Vulkan hdr
Mark Lobodzinski [Mon, 23 Oct 2017 15:23:06 +0000 (09:23 -0600)]
header: Update to version 1.0.64 of the Vulkan hdr

- updated vulkan.h
- updated vk.xml
- updated Win/Lin json files
- updated vk_validation_error_messages.h
- updated vk_validation_error_database.txt
- updated vulkan.hpp
- updated vuid_mapping.py
- updated cube.cpp for vulkan-hpp changes

Change-Id: I79971c3b54feb1fdad5ea2257e4b1b4c6f9e3c3b

6 years agoexternal: Update commit IDs and scripts
Mike Weiblen [Mon, 9 Oct 2017 16:31:21 +0000 (10:31 -0600)]
external: Update commit IDs and scripts

Update to top-of-tree glslang, plus the spirv dependencies
specified by glslang's known_good.json file.

Modify the LVL update_external_sources.* scripts to invoke
glslang's update_glslang_sources.py script as part of the checkout
process.

Add .gitattributes file to force CRLF on .bat files.

Enhance LVL's CMakeLists.txt for new SPIRV_TOOLS_OPT_* variables.

Add SPIRV-Tools-opt to linker.

Adjust some comments.

Change-Id: I8e782c15cade4260528ab055361208af137204fa

6 years agoloader: Fix function name in interface doc
Tobin Ehlis [Mon, 23 Oct 2017 22:22:42 +0000 (16:22 -0600)]
loader: Fix function name in interface doc

There is no "vk_icdGetLoaderICDInterfaceVersion" function. The correct name is "vk_icdNegotiateLoaderICDInterfaceVersion."

6 years agoscripts: Update vuid_mapping.py for 64 header
Mark Lobodzinski [Mon, 23 Oct 2017 17:31:43 +0000 (11:31 -0600)]
scripts: Update vuid_mapping.py for 64 header

Change-Id: I3f55bd5ee0296fc962bb2ee624391e793f8f9fe4

6 years agoloader:Updates to LL Interface Doc
Tobin Ehlis [Thu, 19 Oct 2017 19:58:23 +0000 (13:58 -0600)]
loader:Updates to LL Interface Doc

Fixing some formatting issues and typos as I read through doc.

6 years agolayers: Track WSI fences and semaphores
Mike Schuchardt [Fri, 20 Oct 2017 18:30:00 +0000 (12:30 -0600)]
layers: Track WSI fences and semaphores

Treat temporarily imported semaphores and fences from
vkAcquireNextImageKHR as internal sync objects since the spec allows
them to be waited on.

Change-Id: I195bb7f4b65d141e9fb4a541817b4dc37b6aa600

6 years agolayers: Retire work early on external fence signal
Mike Schuchardt [Wed, 18 Oct 2017 21:12:08 +0000 (15:12 -0600)]
layers: Retire work early on external fence signal

Retire all work up until a signal operation on an external fence and
emit a warning about validation that will no longer occur

Change-Id: Ifdbc6702f664b8206cc3f28f6aba230a7564d76e

6 years agolayers: Compatibility fixes for external fence
Mike Schuchardt [Tue, 17 Oct 2017 23:20:03 +0000 (17:20 -0600)]
layers: Compatibility fixes for external fence

Track when fence objects are exported/imported and skip checks and state
tracking while a fence is using an external payload.

Change-Id: Id53b83f86d5b91719fe212823de02c091e451c9c

6 years agodemos: VkFormatString add missing formats
Wladimir J. van der Laan [Sat, 7 Oct 2017 23:15:26 +0000 (23:15 +0000)]
demos: VkFormatString add missing formats

Some formats were shown as unknown in vulkaninfo's list, make
sure they're all included.

6 years agolayers: Use shared rules for OT CmdPushDescriptorSetKHR
Chris Forbes [Fri, 20 Oct 2017 18:28:02 +0000 (11:28 -0700)]
layers: Use shared rules for OT CmdPushDescriptorSetKHR

6 years agolayers: Factor out checking of descriptor write members
Chris Forbes [Fri, 20 Oct 2017 18:13:20 +0000 (11:13 -0700)]
layers: Factor out checking of descriptor write members

This will allow us to reuse this check for push descriptors, which are
currently inconsistent.

6 years agolayers: GH2145, fix comp<->uncomp copy val errors
Mark Lobodzinski [Thu, 19 Oct 2017 21:38:59 +0000 (15:38 -0600)]
layers: GH2145, fix comp<->uncomp copy val errors

For image-to-image copies, there are special cases for copies between
compressed and uncompressed images. These modifications to copy
extents are now allowed for in the validation checks.

Change-Id: I5d72e4ec621a6769a9a89e24aade5defa9ecabda

6 years agoscripts: Remove asserts from struct size helpers
Joey Bzdek [Thu, 19 Oct 2017 20:24:05 +0000 (14:24 -0600)]
scripts: Remove asserts from struct size helpers

Unknown structures will return a 0 size instead of failing, in order for
them to be ignored properly.

6 years agolayers: Typo in CV function pointer lookup map
Mike Schuchardt [Tue, 17 Oct 2017 16:56:41 +0000 (10:56 -0600)]
layers: Typo in CV function pointer lookup map

Change-Id: I742f6054273dbc7e9b87f42fdc40f3305b0735e7

6 years agolayers: Add VK_KHR_external_semaphore_fd functions
Mike Schuchardt [Tue, 17 Oct 2017 15:54:23 +0000 (09:54 -0600)]
layers: Add VK_KHR_external_semaphore_fd functions

Add entry points and wire up to existing validation in place for
VK_KHR_external_semaphore_win32

Change-Id: I82da27d6a68c7b4eea3f01b4dd4fa0ce38d97f0b

6 years agoloader: Fix info message when activating a layer
Lenny Komow [Mon, 16 Oct 2017 21:03:37 +0000 (15:03 -0600)]
loader: Fix info message when activating a layer

Change-Id: Ibc6df4964a752c9cce574a208714eb096576973c

6 years agolayers: Remove validation error for copying nonupdated descriptors
Józef Kucia [Fri, 13 Oct 2017 20:31:34 +0000 (22:31 +0200)]
layers: Remove validation error for copying nonupdated descriptors

The spec doesn't say much about descriptors copy update valid usage, but
it doesn't seem to require that descriptors are updated before copying.

6 years agolayers: Retire work early on external signals
Mike Schuchardt [Tue, 10 Oct 2017 22:12:05 +0000 (16:12 -0600)]
layers: Retire work early on external signals

Retire all work up until a signal operation on an external semaphore and
emit a warning about validation that will no longer occur.

Change-Id: I3d46464c2c32e37071d702e20e5197a495d60472

6 years agolayers: External semaphore compatibility
Mike Schuchardt [Fri, 7 Jul 2017 14:31:59 +0000 (08:31 -0600)]
layers: External semaphore compatibility

Track when a semaphore payload is imported and restored, turn off
semaphore validation when using an external payload.

Change-Id: Ia5734ce9db10fa56d0de72ad6cfeebb2531b1a45

6 years agoandroid: Use NDK structure for third party modules
Mike Stroyan [Fri, 6 Oct 2017 17:05:21 +0000 (11:05 -0600)]
android: Use NDK structure for third party modules

Locate glslang and spirv directories under shaderc directory.
This allows the layers build to optionally use the NDK sources.
For glslang and spirv and shaderc-
 Use LOCAL_STATIC_LIBRARIES instead of LOCAL_C_INCLUDES to find headers.
 Use import-module instead of PREBUILT_STATIC_LIBRARY.

6 years agoLOCAL_C_INCLUDES and LOCAL_CPPFLAGS changes
Mike Stroyan [Thu, 5 Oct 2017 22:08:50 +0000 (16:08 -0600)]
LOCAL_C_INCLUDES and LOCAL_CPPFLAGS changes

Drop abspath from LOCAL_PATH.
Use LOCAL_PATH for LOCAL_C_INCLUDES but not LOCAL_SRC_FILES.
Move LOCAL_CPPFLAGS from Application.mk to Android.mk.

6 years agolayers: Only include self-dependencies in subpass->dep index
Chris Forbes [Thu, 12 Oct 2017 19:25:00 +0000 (12:25 -0700)]
layers: Only include self-dependencies in subpass->dep index

Only self-dependencies permit barriers within the renderpass, so we
don't want any other dependencies here.

Fixes #2123

6 years agolayers:Verify valid buffer for tex buff ds update
Tobin Ehlis [Wed, 11 Oct 2017 14:48:00 +0000 (08:48 -0600)]
layers:Verify valid buffer for tex buff ds update

Fixes #2104

Make sure that buffer underlying the bufferView of texel buffer for a
uniform or storage texel buffer update has a valid buffer behind it.
Object tracker only checks to make sure that the view itself hasn't
been destroyed, so need this extra level of checking at this level to
avoid crash.

6 years agoloader/vulkan.pc.in: GH1212; Libraries required by vulkan.so for
John Zupin [Tue, 10 Oct 2017 20:39:00 +0000 (14:39 -0600)]
loader/vulkan.pc.in: GH1212; Libraries required by vulkan.so for
for static linking purposes should go into Libs.private

6 years agoscripts: add get_struct_size helper function
David Pinedo [Thu, 5 Oct 2017 16:30:02 +0000 (10:30 -0600)]
scripts: add get_struct_size helper function

Change-Id: I12494a129ef8be68170dddf4efe6762f4051b116

6 years agolayers: Relax MinImageTransferGranularity checks
Mark Lobodzinski [Mon, 9 Oct 2017 22:36:49 +0000 (16:36 -0600)]
layers: Relax MinImageTransferGranularity checks

Ignore depth for 1D, 2D transfers, height for 1D transfers.

Change-Id: Ibbf6b9bf0af9d74833d901453c9e9f59b80820a5

6 years agodemos: Use correct type for alphaMode in display surface
Wladimir J. van der Laan [Sat, 7 Oct 2017 12:17:41 +0000 (14:17 +0200)]
demos: Use correct type for alphaMode in display surface

alphaMode in VkDisplaySurfaceCreateInfoKHR is
VkDisplayPlaneAlphaFlagBitsKHR, not VkCompositeAlphaFlagBitsKHR.

6 years agodemos: Update cube.cpp DISPLAY_KHR code
Wladimir J. van der Laan [Sat, 7 Oct 2017 09:16:24 +0000 (09:16 +0000)]
demos: Update cube.cpp DISPLAY_KHR code

The physical display rendering code didn't compile due to drift in
`vulcan.hpp`. Update for these changes.

Tested on i.MX8M / Vivante GC7000L.

6 years agovulkaninfo: Remove "INFO" messages
Jeremy Kniager [Wed, 13 Sep 2017 21:05:07 +0000 (15:05 -0600)]
vulkaninfo: Remove "INFO" messages

Change-Id: I10bb9559bd91f29bb224f7cb90359ec14161a770

6 years agolayers: Remove AccessMask->ImageLayout checks
Mark Lobodzinski [Mon, 9 Oct 2017 21:12:11 +0000 (15:12 -0600)]
layers: Remove AccessMask->ImageLayout checks

Spec no longer calls out valid usage for image layouts related to
access masks.

Change-Id: Iedbe8689a0c3a569a4f7a473f801afae250c8256

6 years agoLoader: Fix OOM in loaderGetDeviceRegistryFiles()
Igor Ostrowski [Fri, 6 Oct 2017 16:26:23 +0000 (18:26 +0200)]
Loader: Fix OOM in loaderGetDeviceRegistryFiles()

loaderGetDeviceRegistryEntry() out of memory result was not handled properly.

6 years agoheader: Update to version 1.0.62 of the Vulkan hdr
Mark Lobodzinski [Mon, 9 Oct 2017 19:06:50 +0000 (13:06 -0600)]
header: Update to version 1.0.62 of the Vulkan hdr

- updated vulkan.h
- updated vk.xml
- updated Win/Lin .json files
- updated vuid_mapping.py
- updated vk_validation_error_database.txt
- updated vk_validation _error_messages.h
- updated vulkan.hpp

Change-Id: I82eb3db55d301af3a11ffbb12411cc2df7c31807

6 years agoscripts: Specify utf-8 encoding for db file
Mark Lobodzinski [Mon, 9 Oct 2017 15:16:40 +0000 (09:16 -0600)]
scripts: Specify utf-8 encoding for db file

Change-Id: I0a76a6d9766041a9f70053e7385517c0b1d7022c

6 years agoscripts: Handle goofy unicode chars in spec.py
Mark Lobodzinski [Mon, 9 Oct 2017 15:10:21 +0000 (09:10 -0600)]
scripts: Handle goofy unicode chars in spec.py

Forward and backward double-quotes are now changed to standard
double-quote chars, and escaped as they are output in the DB.

Change-Id: Icbdc23262c8da0dd2441b028997a3f30d69d6834

6 years agolayers: Add caller to ValidateObjectNotInUse
Mike Schuchardt [Wed, 27 Sep 2017 20:56:21 +0000 (14:56 -0600)]
layers: Add caller to ValidateObjectNotInUse

Make ValidateObjectNotInUse more generic so it can be used for cases
other than delete/destroy

Change-Id: I8983be88a42323021306c9d314ce6558fadcbd5e

6 years agolayers: Refactor AcquireNextImageKHR for pre/post
Mike Schuchardt [Wed, 27 Sep 2017 03:05:04 +0000 (21:05 -0600)]
layers: Refactor AcquireNextImageKHR for pre/post

Change-Id: I408a1b84a16dd302a8b8ef01d04672b4c37a3fc2

6 years agolayers: Refactor vkQueueBindSparse for pre/post
Mike Schuchardt [Fri, 25 Aug 2017 18:11:34 +0000 (12:11 -0600)]
layers: Refactor vkQueueBindSparse for pre/post

Change-Id: I140e11653a0fa97e61d6df9c87e5223b7f28a04f

6 years agotests: Fix doc validator script
Mark Lobodzinski [Thu, 5 Oct 2017 16:44:27 +0000 (10:44 -0600)]
tests: Fix doc validator script

Script was intolerant of unicode characters that now show up in the
spec.

Change-Id: I125f12139eec395ffc8ae61e92de1428fa2ac0c6

6 years agoloader: Fix TEXTREL on 32-bit linux loader
Lenny Komow [Fri, 6 Oct 2017 17:13:15 +0000 (11:13 -0600)]
loader: Fix TEXTREL on 32-bit linux loader

Change-Id: I5fc568ce0ad17c280c484f37b2797eead08169b3

6 years agobuild: Limit control flow guard to loader/demos
Mark Lobodzinski [Thu, 5 Oct 2017 17:18:52 +0000 (11:18 -0600)]
build: Limit control flow guard to loader/demos

Change-Id: Ibb95a7192bd95195797d3d10ccc0ed34fe030268

6 years agolayers: Implement vkCreateDescriptorPool() checks
Petr Kraus [Wed, 27 Sep 2017 16:56:51 +0000 (18:56 +0200)]
layers: Implement vkCreateDescriptorPool() checks

Check explicit validity of vkCreateDescriptorPool():
- maxSets > 0
- pPoolSizes[].descriptorCount > 0

+ implement relevant tests

6 years agoscripts: Generate copy assignment operators for safe_*
Chris Forbes [Wed, 4 Oct 2017 01:11:54 +0000 (18:11 -0700)]
scripts: Generate copy assignment operators for safe_*

6 years agotravis: Add 64-bit to Android build
Cody Northrop [Fri, 29 Sep 2017 20:50:54 +0000 (14:50 -0600)]
travis: Add 64-bit to Android build

This is done as a parallel build, so should not impact wait time.

6 years agoandroid: Update toolchain build to handle single ABI
Cody Northrop [Fri, 29 Sep 2017 21:34:45 +0000 (15:34 -0600)]
android: Update toolchain build to handle single ABI

This reduces local arm32 toolchain build from 3m30s to 42s.

Also update Travis-CI config to use the new flag, greatly reducing
Android build time.

6 years agolayers:Fix renderPass<->cmdBuffer binding
Tobin Ehlis [Thu, 28 Sep 2017 19:20:53 +0000 (13:20 -0600)]
layers:Fix renderPass<->cmdBuffer binding

At BeginRenderPass() time bind the active renderPass to the cmdBuffer.
Don't bind the renderPass used to create the framebuffer. The
renderPass lifetime rules allow the renderPass used in FB creation to
be destroyed after FB creation.

6 years agolayers:Remove invalid renderPass binding
Tobin Ehlis [Thu, 28 Sep 2017 18:46:58 +0000 (12:46 -0600)]
layers:Remove invalid renderPass binding

There's no reason to create a binding between RP used in pipeline
creation and the cmd buffer that pipeline is bound to. This can lead
to a bug where CB is incorrectly invalidated if that RP is destroyed
after pipeline is bound to CB.

6 years agolayers: Avoid potential NULL pointer dereference
Józef Kucia [Fri, 22 Sep 2017 16:01:07 +0000 (18:01 +0200)]
layers: Avoid potential NULL pointer dereference

The boundDescriptorSets vector may be resized in
PreCallRecordCmdBindDescriptorSets().

6 years agoheader: revert constexpr change in vulkan.hpp
Mike Schuchardt [Tue, 19 Sep 2017 21:00:40 +0000 (15:00 -0600)]
header: revert constexpr change in vulkan.hpp

constexpr was previously removed to preserve compatibility with Visual
Studio 2013.  This causes linker errors when vulkan.hpp is included in
multiple file.

Change-Id: I3a301c669ceb300f49982abacdb21543ea8ee764

6 years agobuild: Update for 1.0.61.0 SDK
Lenny Komow [Mon, 18 Sep 2017 23:07:00 +0000 (17:07 -0600)]
build: Update for 1.0.61.0 SDK

Change-Id: I4b1f0289dace648153b6efdbfea0d83d37b28e60

6 years agolayers: Correctly check if descriptor was updated
Józef Kucia [Thu, 21 Sep 2017 15:07:37 +0000 (17:07 +0200)]
layers: Correctly check if descriptor was updated

6 years agolayers:Pipe state owns render pass ptr
Tobin Ehlis [Mon, 18 Sep 2017 14:38:37 +0000 (08:38 -0600)]
layers:Pipe state owns render pass ptr

Pipeline can outlive the renderPass that it's created with so add
shared_ptr to RENDER_PASS_STATE to PIPELINE_STATE to make sure
renderPass is available for the life of the pipeline.

6 years agolayers: use VU for index buffer alignment check
Chris Forbes [Fri, 15 Sep 2017 18:07:53 +0000 (11:07 -0700)]
layers: use VU for index buffer alignment check

6 years agolayers: Implement VU check for BUFFER_USAGE_VERTEX_BUFFER_BIT
Chris Forbes [Thu, 14 Sep 2017 23:03:37 +0000 (16:03 -0700)]
layers: Implement VU check for BUFFER_USAGE_VERTEX_BUFFER_BIT

6 years agolayers: Implement VU check for BUFFER_USAGE_INDEX_BUFFER_BIT
Chris Forbes [Thu, 14 Sep 2017 18:13:34 +0000 (11:13 -0700)]
layers: Implement VU check for BUFFER_USAGE_INDEX_BUFFER_BIT

6 years agolayers:Kill push descriptor perf warning
Tobin Ehlis [Wed, 13 Sep 2017 17:49:54 +0000 (11:49 -0600)]
layers:Kill push descriptor perf warning

6 years agolayers:Use existing ds layout to create push desc
Tobin Ehlis [Wed, 13 Sep 2017 17:11:14 +0000 (11:11 -0600)]
layers:Use existing ds layout to create push desc

Just look up descriptor set layout for given set from pipeline layout
state when creating a push descriptor.
No need to re-create the layout on the fly.

6 years agolayers: Use layout flags to test for push descriptor sets
Józef Kucia [Sun, 10 Sep 2017 09:24:08 +0000 (11:24 +0200)]
layers: Use layout flags to test for push descriptor sets

6 years agolayers: Fix memory leak in PreCallRecordCmdPushDescriptorSetKHR()
Józef Kucia [Sun, 10 Sep 2017 09:02:31 +0000 (11:02 +0200)]
layers: Fix memory leak in PreCallRecordCmdPushDescriptorSetKHR()

6 years agoloader: Fix crash from loading invalid ICD
Lenny Komow [Wed, 13 Sep 2017 04:54:21 +0000 (22:54 -0600)]
loader: Fix crash from loading invalid ICD

Addresses LunarXchange issue 711

Change-Id: Ia67441a3adde5ddf9d72ffd12c8cc5fb44071b96

6 years agodemos: Add support for headless XCB
Andreas Bergmeier [Wed, 13 Sep 2017 13:55:16 +0000 (15:55 +0200)]
demos: Add support for headless XCB

For headless XCB we cannot create a surface. Simply ignore XCB if
connection could not be established or any other error occured.

Change-Id: I32db6aa3fc14887658d4290dcabbe8a1930cd8b3

6 years agodemos: Print XCB errors to stderr
Andreas Bergmeier [Wed, 6 Sep 2017 19:49:50 +0000 (21:49 +0200)]
demos: Print XCB errors to stderr

Printing to stdout is weird.

Change-Id: If53e8708b853989ae8a9ea61fa4d57f27b24b45c

6 years agoRevert "layers: Fix Graphics Pipeline pointers not ignored"
Mark Lobodzinski [Tue, 12 Sep 2017 15:50:25 +0000 (09:50 -0600)]
Revert "layers: Fix Graphics Pipeline pointers not ignored"

This caused segfaults on Intel Skylake, NexusPlayer, and
Samsung Galaxy S8 (Mali).

This reverts commit 367d276ffe5c0748ff9d8e2b3551d4a00c9fc3c2.

6 years agolayers: Fix Graphics Pipeline pointers not ignored
Petr Kraus [Sun, 10 Sep 2017 00:26:33 +0000 (02:26 +0200)]
layers: Fix Graphics Pipeline pointers not ignored

Some VkGraphicsPipelineCreateInfo pointers must be ignored under some
conditions, but were not in the layers.

Add relevant tests.

Fix tests found broken (using depth or color without attachment in
subpass)

Change-Id: I3e2a3f61a52c72ce3a11483ff8b031189f4c61c9

6 years agolayers: Add support for VK_AMD_mixed_attachment_samples
Maciej Jesionowski [Wed, 6 Sep 2017 09:25:36 +0000 (11:25 +0200)]
layers: Add support for VK_AMD_mixed_attachment_samples

Change-Id: I2ee0ab4c2ba7510316f190689fd3d81db27cb04f

6 years agoscripts: Check toolchain revisions, remove if they differ
Cody Northrop [Fri, 8 Sep 2017 16:33:53 +0000 (10:33 -0600)]
scripts: Check toolchain revisions, remove if they differ

This script compares tracked revisions against those under external
and deletes them if they differ.

6 years agoheader: Update to 1.0.60
Mike Schuchardt [Tue, 5 Sep 2017 22:10:20 +0000 (16:10 -0600)]
header: Update to 1.0.60

Change-Id: I118be4455c68800e27fd9b8293699037449f1413

6 years agoscripts: Fix VkShaderModuleCreateInfo safe struct
Mike Schuchardt [Mon, 4 Sep 2017 17:38:42 +0000 (11:38 -0600)]
scripts: Fix VkShaderModuleCreateInfo safe struct

Allocate and copy the entire shader program instead of just the first 4
bytes.

Change-Id: I24dd136d59952f9e8b690bf4fe1702106482a3be

6 years agolayers:Clean up shared_ptr use
Tobin Ehlis [Thu, 7 Sep 2017 20:24:36 +0000 (14:24 -0600)]
layers:Clean up shared_ptr use

Use make_shared to construct RENDER_PASS_STATE shared_ptr at
CreateRenderPass() time, return the shared_ptr by value from helper
function and accecpt rvalue ref in FRAMEBUFFER_STATE constructor.

6 years agolayers:Fix render pass lifetime hole
Tobin Ehlis [Thu, 7 Sep 2017 15:16:49 +0000 (09:16 -0600)]
layers:Fix render pass lifetime hole

A framebuffer can outlive the renderpass that it's created with so
update FRAMEBUFFER_STATE object to have a shared_ptr to render pass
state.

6 years agolayers:Remove is_multi from render pass check
Tobin Ehlis [Thu, 7 Sep 2017 14:43:19 +0000 (08:43 -0600)]
layers:Remove is_multi from render pass check

The is_multi bool is no longer needed in the render pass compatibility
check.

6 years agolayers:Don't access render pass map directly
Tobin Ehlis [Thu, 7 Sep 2017 14:39:50 +0000 (08:39 -0600)]
layers:Don't access render pass map directly

Use GetRenderPassState() helper function to create FRAMEBUFFER_STATE
object.

6 years agolayers:Consolidate render pass compatibility
Tobin Ehlis [Wed, 6 Sep 2017 20:28:45 +0000 (14:28 -0600)]
layers:Consolidate render pass compatibility

Remove duplicate render pass compatibility function and consolidate to
single function. Add error VUIDs for various draw-time errors related
to incompatible render passes and mis-matched subpass.

6 years agolayers:Migrate render pass compatibility check
Tobin Ehlis [Wed, 6 Sep 2017 19:27:52 +0000 (13:27 -0600)]
layers:Migrate render pass compatibility check

Update render pass compatibility check at BeginCommandBuffer time to
use the refactored common function. Phasing out the other compatibility
function.

6 years agolayers:Check renderPass/framebuffer compatibility
Tobin Ehlis [Wed, 6 Sep 2017 17:13:19 +0000 (11:13 -0600)]
layers:Check renderPass/framebuffer compatibility

Add check for VUID VALIDATION_ERROR_12000710. This is a check at
CmdBeginRenderPass time to make sure that the render pass being begun
is compatible with the render pass that the referenced framebuffer was
created with.

6 years agolayers:Generalize validateRenderPassCompatibility
Tobin Ehlis [Wed, 6 Sep 2017 16:46:41 +0000 (10:46 -0600)]
layers:Generalize validateRenderPassCompatibility

We have 2 separate function for checking render pass compatibility that
are nearly identical. This change is refactoring one of the functions
to make it more general-purpose so that it can be used for all of the
render pass compatibility checks. This includes passing through the
caller, a VUID, and some strings for the types of objects that are
having their render passes compared.

Added some temp comments on VUIDs that will be added for various render
pass compatibility checks.
Update framebuffer state struct to store render pass state ptr instead
of just the render pass create info.

6 years agoexternal: Update Android commit IDs
Mike Weiblen [Thu, 7 Sep 2017 16:40:58 +0000 (10:40 -0600)]
external: Update Android commit IDs

With this, LVL's Android externals match those of shaderc's known-good
as of cd52beb9

Change-Id: Ic408469d007b632f16229b3e2be0abe82abe5869

6 years agolayers: Add script to create VU stats in CSV
Mike Weiblen [Wed, 6 Sep 2017 19:41:19 +0000 (13:41 -0600)]
layers: Add script to create VU stats in CSV

A simple utility bash script to generate Valid Usage completion
statistics in CSV format, for loading and analyzing in a spreadsheet.

Change-Id: Id45a20ea83d555029cb11418ac5d19c38fd28a15

6 years agoexternal: Update spirv commit IDs
Mike Weiblen [Wed, 6 Sep 2017 20:09:37 +0000 (14:09 -0600)]
external: Update spirv commit IDs

Update externals commit IDs for spriv headers and tools.

With this, LVL's externals match those of shaderc's known-good as of cd52beb9

Change-Id: I610c68d1c7910e70acfa7065c64c23862a7d25c5

6 years agodocs: Update loader doc for pnp registry changes
Lenny Komow [Thu, 31 Aug 2017 23:19:17 +0000 (17:19 -0600)]
docs: Update loader doc for pnp registry changes

Change-Id: I3d41b7b01140243457ac35cfa2c22235f35e4e83

6 years agoloader: Allow layer loading from pnp registry
Lenny Komow [Thu, 31 Aug 2017 22:35:08 +0000 (16:35 -0600)]
loader: Allow layer loading from pnp registry

Change-Id: I70682cf5904b95b52881457e14bbc2f9a772259d

6 years agoloader: Fix PnP 32-bit registry handling
Lenny Komow [Thu, 31 Aug 2017 16:44:17 +0000 (10:44 -0600)]
loader: Fix PnP 32-bit registry handling

Change-Id: I25eae83b4783e702ca5fbe74a99d7bdeae6218f0

6 years agolayers: Fix leaking backing sets for push descriptors
Chris Forbes [Sat, 2 Sep 2017 00:03:21 +0000 (17:03 -0700)]
layers: Fix leaking backing sets for push descriptors

We'd previously leak any temporary descriptor set left bound to the
pipeline at the end of the command buffer. Rearrange things so we can
use unique_ptr and assure it's always cleaned up correctly.

6 years agoheaders: Fix a typo in vk_icd.h
Lenny Komow [Tue, 5 Sep 2017 15:21:47 +0000 (09:21 -0600)]
headers: Fix a typo in vk_icd.h

Change-Id: I9ede42e379605329ffd25a9466e0971b3ab7dd77

6 years agobuild: Touch appveyor config to invalidate cache
Karl Schultz [Mon, 4 Sep 2017 14:16:23 +0000 (08:16 -0600)]
build: Touch appveyor config to invalidate cache

6 years agolayers: Remove remnants of old perf warning for disturbing sets
Chris Forbes [Fri, 1 Sep 2017 17:10:12 +0000 (10:10 -0700)]
layers: Remove remnants of old perf warning for disturbing sets

Half of this was removed, but the surrounding plumbing was left in
place. If we want to quietly add some 'was disturbed' bits so we can
produce a better error at a later draw, that should go on the
record-side of this validation, not here.

Removes the other case that the previous change missed, along with the
vestigial bits of the previous check.

Remove subtest and surrounding scaffolding that tested this

6 years agoCMake: GH1989, add wayland include dir to cmake
John Zupin [Mon, 21 Aug 2017 22:36:45 +0000 (16:36 -0600)]
CMake: GH1989, add wayland include dir to cmake

On some Linux distributions (e.g  openSUSE) the wayland headers are in
a subdirectory.
Adding WAYLAND_CLIENT_INCLUDE_DIR to include_directories in CMakeLists.txt
will fix this issue.

6 years agoexternal: Update commit ID: glslang
Mike Weiblen [Fri, 1 Sep 2017 17:25:50 +0000 (11:25 -0600)]
external: Update commit ID: glslang

Update to most recent glslang-specified commit.

Change-Id: I35d8438833319e2d662dcf20353199d52f0b2ac0