platform/upstream/Vulkan-Tools.git
8 years agoloader: temp workaround for advertising linux wsi surface extensions
Jon Ashburn [Thu, 7 Apr 2016 13:17:22 +0000 (07:17 -0600)]
loader: temp workaround for advertising linux wsi surface extensions

Change-Id: I9a03c6ea16abe9e362ef81ee87ac217b8b3c6c92

8 years agolayers: Don't exceed max allowed color attachments.
Michael Lentine [Wed, 6 Apr 2016 22:40:22 +0000 (17:40 -0500)]
layers: Don't exceed max allowed color attachments.

8 years agolayers: Move call to validateCommandBuffersNotInUse inside lock
Tony Barbour [Thu, 7 Apr 2016 00:17:57 +0000 (18:17 -0600)]
layers: Move call to validateCommandBuffersNotInUse inside lock

Fixes segv in CTS multithreaded command pool test

Change-Id: I80da12fd2bb6856e3c6824f17dd92f1597121a54

8 years agoloader: Update specification doc for dispatchable object initialization
Jon Ashburn [Mon, 4 Apr 2016 22:37:37 +0000 (16:37 -0600)]
loader: Update specification doc for dispatchable object initialization

Change-Id: I80770b7ab14795316400279dc4e7c954fa5ad374

8 years agolayers: Fix 32-bit Windows build
Dustin Graves [Wed, 6 Apr 2016 22:47:10 +0000 (16:47 -0600)]
layers: Fix 32-bit Windows build

Change reinterpret_cast<uint64_t> to reinterpret_cast<uint64_t&>.

Change-Id: I87b8479df6ba7f93b922bab11edbbf6c4fbfe7f6

8 years agolayers: Ensure bind point for subass is graphics.
Michael Lentine [Wed, 6 Apr 2016 18:15:46 +0000 (13:15 -0500)]
layers: Ensure bind point for subass is graphics.

8 years agolayers: Fix MSVS value truncation warning
Dustin Graves [Wed, 6 Apr 2016 17:06:19 +0000 (11:06 -0600)]
layers: Fix MSVS value truncation warning

Changed the type of the string validation constants to from char to
uint8_t to fix warning C4309: 'initializing' : truncation of constant
value, due to an implicit unsgined char to signed char conversion.

Change-Id: I86cca4b1a8c3f818a2e7a9a7e38f05ee8cd01150

8 years agodemos/tests: Fix MSVS type warnings
Dustin Graves [Wed, 6 Apr 2016 16:16:05 +0000 (10:16 -0600)]
demos/tests: Fix MSVS type warnings

Fixes the following MSVS warnings:
- C4800 - forcing value to bool 'true' or 'false'
- C4244 - conversion from type1 to type2, possible loss of data
- C4267 - conversion from size_t to type, possible loss of data

Change-Id: I78576c48c5d42e4c9116a83c5f4a4f4a5035e0fc

8 years agolayers: Remove plumbing through of unused dispatchable object through MT
Chris Forbes [Wed, 6 Apr 2016 03:16:26 +0000 (15:16 +1200)]
layers: Remove plumbing through of unused dispatchable object through MT

Much of this was eventually going to go away anyway, but getting rid of
this thread of it was trivial.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Merge binding maps into image and buffer maps
Tobin Ehlis [Tue, 5 Apr 2016 19:33:00 +0000 (13:33 -0600)]
layers: Merge binding maps into image and buffer maps

mem_tracker layer had specific maps to track memory binding for images
and buffers. This change merges the data from those maps into IMAGE_NODE
and BUFFER_NODE respectively and eliminates the binding maps.

8 years agoUpdate vk_layer.h
Vinjn Zhang [Wed, 6 Apr 2016 07:38:24 +0000 (15:38 +0800)]
Update vk_layer.h

Correct comment for VkLayer*CreateInfo's sType

8 years agoloader: Fix regression with dEQP-VK.api.object_management.alloc_callback_fail.device
Piers Daniell [Tue, 5 Apr 2016 23:28:06 +0000 (17:28 -0600)]
loader: Fix regression with dEQP-VK.api.object_management.alloc_callback_fail.device

When the loader vkCreateDevice trampoline code calls down to
vkCreateDevice don't update the dev->device field with a bogus device
handle.

Change-Id: I703acb5283650ab0013483bda0f478da9b46e3ea

8 years agolayers: Insist on each shader's stage being unique in a pipeline
Chris Forbes [Tue, 5 Apr 2016 23:21:28 +0000 (11:21 +1200)]
layers: Insist on each shader's stage being unique in a pipeline

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoValidate attachment index is in range.
Michael Lentine [Tue, 5 Apr 2016 16:38:12 +0000 (11:38 -0500)]
Validate attachment index is in range.

8 years agolayers: Implement relaxed vec-vec and vec-scalar matching rules
Chris Forbes [Tue, 5 Apr 2016 05:51:35 +0000 (17:51 +1200)]
layers: Implement relaxed vec-vec and vec-scalar matching rules

- Track whether we've seen anything disqualifying -- non-stripped
  arrays, matrices, structures, etc.
- Add relaxed vec/scalar and vec/vec matches if not disqualified.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Explicit VK_TRUE/VK_FALSE checks
Dustin Graves [Tue, 5 Apr 2016 21:15:40 +0000 (15:15 -0600)]
layers: Explicit VK_TRUE/VK_FALSE checks

Add explicit VK_FALSE/VK_TRUE conditional checks.

Change-Id: Idb5c82ce53d54c9f2c378dc557152efc695ae2b1

8 years agolayers: Fix unsafe bool mix warnings (part 2)
Dustin Graves [Tue, 5 Apr 2016 19:48:15 +0000 (13:48 -0600)]
layers: Fix unsafe bool mix warnings (part 2)

Fixes the MSVS warnings regarding unsafe mix of VkBool32 and bool for the
device_limits, image, parameter_validation, and threading layers.
Converts all Boolean usage internal to the layers to bool/true/false.  The
VK_TRUE and VK_FALSE values continue to be used with the Vulkan API
components.

Change-Id: I612d3f26050fadcd77ffca4d8723a7c734613816

8 years agolayers: Fix unsafe bool mix warnings
Dustin Graves [Tue, 5 Apr 2016 15:41:17 +0000 (09:41 -0600)]
layers: Fix unsafe bool mix warnings

Fixes the MSVS warnings regarding unsafe mix of VkBool32 and bool for the
core_validation layer.  Converts all Boolean values internal to the layer
to bool/true/false.  The VK_TRUE and VK_FALSE values continue to be used
with the Vulkan API components.

Change-Id: I9a298e2a9f5f92a388a2b7c158451d237fdb4fc0

8 years agoloader: remove unused instance_dispatch.png
Karl Schultz [Wed, 6 Apr 2016 13:18:42 +0000 (07:18 -0600)]
loader: remove unused instance_dispatch.png

Change-Id: I67ebce2e4e46a5a1439bb35fb966ed522c80ee52

8 years agowinrtinstaller: sort in config script: <prerelease> is least significant
David Pinedo [Mon, 4 Apr 2016 17:43:50 +0000 (11:43 -0600)]
winrtinstaller: sort in config script: <prerelease> is least significant

Also added execute permission to CreateInstallerRT.sh

8 years agowinrtinstaller: fix install dir not being removed on uninstall.
David Pinedo [Tue, 5 Apr 2016 22:40:08 +0000 (16:40 -0600)]
winrtinstaller: fix install dir not being removed on uninstall.

This problem was introduced when logging was added.

8 years agoloader: bump linux version
Jeremy Hayes [Tue, 5 Apr 2016 21:46:17 +0000 (15:46 -0600)]
loader: bump linux version

Change-Id: I6c9e9b7650a7599797e93e60eb2191345c3e6ec8

8 years agoloader: Temp workaround to add WSI surface extensions enumerated.
Jon Ashburn [Mon, 4 Apr 2016 22:55:24 +0000 (16:55 -0600)]
loader: Temp workaround to add WSI surface extensions enumerated.

Change-Id: Ibb9ffa80bbb71d15296e39730f48f33c23bd331a

8 years agolayers: Fix return values of bool functions.
Jamie Madill [Mon, 4 Apr 2016 16:15:39 +0000 (12:15 -0400)]
layers: Fix return values of bool functions.

These functions were returning VK_ERROR_VALIDATION_FAILED_EXT,
which was giving a warning in Visual Studio. The app shouldn't be
checking for non-bool return values of these functions.

Change-Id: I9924a25b1c49ad6973c8915be1dd7aea4cc0edf4

8 years agolayers: Change include order of loader platform.
Jamie Madill [Mon, 4 Apr 2016 15:54:43 +0000 (11:54 -0400)]
layers: Change include order of loader platform.

This fixes a bug where on Windows, windows.h would include
winsock.h before winsock2.h, causing numerous warnings.

Change-Id: I8eba1497385dcee6ebb201c74fe48268e6663b9c

8 years agoFix 4 MSVS warnings in loader and layers.
Jamie Madill [Mon, 4 Apr 2016 19:09:51 +0000 (15:09 -0400)]
Fix 4 MSVS warnings in loader and layers.

warning C4267: conversion, possible loss of data
warning C4389: signed/unsigned mismatch
warning C4701: potentially uninitialized local variable used
warning C4702: unreachable code

Change-Id: Ibc2ce3825a986c3701f6e0e6244a0e30fbf7e87c

8 years agolayers: Clean up PIPELINE_NODE using safe_struct
Tobin Ehlis [Fri, 1 Apr 2016 19:51:33 +0000 (13:51 -0600)]
layers: Clean up PIPELINE_NODE using safe_struct

PIPELINE_NODE was storing ptrs from the app and has some ugly initialization code
for the gfx pipeline create struct. This commit switches pipeline node to use
safe_struct wrappers for Gfx and Compute create info.
There were also some bugs found in the safe_struct wrappers making this migration
so those are cleaned up in this commit as well.

8 years agoloader: ghlvl #204, Use __secure_getenv if secure_getenv is unavailable
Jon Ashburn [Mon, 4 Apr 2016 19:52:53 +0000 (13:52 -0600)]
loader: ghlvl #204, Use __secure_getenv if secure_getenv is unavailable

Also add group id check to getenv suid check in loader.

Change-Id: Icbc08258498f893ee5fce144c043bdc6bd8e5423

8 years agowinrtinstaller: Re-sign powershell loader config script
David Pinedo [Mon, 4 Apr 2016 21:32:49 +0000 (15:32 -0600)]
winrtinstaller: Re-sign powershell loader config script

8 years agolayers: Fix 7 signed/unsigned comparison warnings on VS2015
Michael Mc Donnell [Sun, 3 Apr 2016 21:47:51 +0000 (14:47 -0700)]
layers: Fix 7 signed/unsigned comparison warnings on VS2015

8 years agolayers: Fix MSVS shadowing warning in core_validation.
Jamie Madill [Mon, 4 Apr 2016 18:39:53 +0000 (14:39 -0400)]
layers: Fix MSVS shadowing warning in core_validation.

warning 4457: declaration of 'fence' hides function parameter

8 years agolayers: Fix MSVS noexcept warning in core_validation.
Jamie Madill [Mon, 4 Apr 2016 18:42:21 +0000 (14:42 -0400)]
layers: Fix MSVS noexcept warning in core_validation.

warning 4577: 'noexcept' used with no exception handling mode specified

8 years agolayers: Fix paramcheck struct array NULL indexing
Dustin Graves [Mon, 4 Apr 2016 17:14:01 +0000 (11:14 -0600)]
layers: Fix paramcheck struct array NULL indexing

Fixes an issue where the generated parameter_validation code could
index a NULL pointer to an array of structs.

Change-Id: If78f1c97ea256911d857b0b8009b38e6ca6f2581

8 years agoRevert "layers: LX265 Error if color blend attch count != subpass attch."
Tony Barbour [Mon, 4 Apr 2016 16:59:56 +0000 (10:59 -0600)]
Revert "layers: LX265 Error if color blend attch count != subpass attch."

This reverts commit dcce8143110568353a6217e5b885da407edd29be.

Change-Id: I0882b499b38e3cf7670846a9ffae48a0fbf015a3

8 years agoFix find layout to search on each aspect bit.
Michael Lentine [Wed, 30 Mar 2016 20:57:52 +0000 (15:57 -0500)]
Fix find layout to search on each aspect bit.

Change-Id: I155ee469ef98d1ad9b1bfc8813a1cff43f30f8ca

8 years agolayers: GH226 Add check for descriptor slot to make sure it's updated
Tobin Ehlis [Fri, 1 Apr 2016 00:02:51 +0000 (18:02 -0600)]
layers: GH226 Add check for descriptor slot to make sure it's updated

We have an existing check to make sure that a set has been updated, but there was
still a hole where individual slots may not have an update. This adds an additional
check to make sure that we flag any slots that are used by not updated at draw time.

8 years agolayers: Update to version 1.0.8 JSON files
Jon Ashburn [Mon, 4 Apr 2016 16:53:27 +0000 (10:53 -0600)]
layers: Update to version 1.0.8 JSON files

Change-Id: Ic35eb444c34004343e5fb19cc54f12518512c6be

8 years agoheader: update to vers 1.0.8 which had no changes
Jon Ashburn [Mon, 4 Apr 2016 16:47:18 +0000 (10:47 -0600)]
header:  update to vers 1.0.8 which had no changes

Change-Id: I809110e8483d1877f5106551d9f066ed6c25d8bc

8 years agoFix def file generation to depend on vulkan.py.
Jamie Madill [Mon, 4 Apr 2016 14:58:33 +0000 (10:58 -0400)]
Fix def file generation to depend on vulkan.py.

8 years agoAllow vk-generate.py to work in Python 2.
Jamie Madill [Mon, 4 Apr 2016 15:20:24 +0000 (11:20 -0400)]
Allow vk-generate.py to work in Python 2.

There were two places where this script called super, one with
Python 2 and 3 compatible syntax and one with Python 3 only. Fix
it to use the compatible syntax in both locations.

8 years agolayers: Removed duplicate dynamicOffsets from core_validation
Tobin Ehlis [Wed, 30 Mar 2016 15:32:19 +0000 (09:32 -0600)]
layers: Removed duplicate dynamicOffsets from core_validation

Missed this from a rebase conflict. Kill top-level cmd buffer node
dynamicOffsets vector and only use vector based off of lastBound data.

8 years agotests: Add test case for patch decoration mismatch
Chris Forbes [Mon, 4 Apr 2016 07:19:47 +0000 (19:19 +1200)]
tests: Add test case for patch decoration mismatch

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Flag difference in patch decoration correctly
Chris Forbes [Tue, 29 Mar 2016 03:57:02 +0000 (16:57 +1300)]
layers: Flag difference in patch decoration correctly

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Strip array level from both sides of TCS->TES interface
Chris Forbes [Tue, 29 Mar 2016 03:41:07 +0000 (16:41 +1300)]
layers: Strip array level from both sides of TCS->TES interface

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Rework array-of-verts stripping a bit to support patch
Chris Forbes [Tue, 29 Mar 2016 03:38:44 +0000 (16:38 +1300)]
layers: Rework array-of-verts stripping a bit to support patch

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Collect whether an interface_var has patch decoration
Chris Forbes [Tue, 29 Mar 2016 03:14:02 +0000 (16:14 +1300)]
layers: Collect whether an interface_var has patch decoration

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodocs: fix spelling mistakes
Eric Engestrom [Sat, 2 Apr 2016 21:09:09 +0000 (22:09 +0100)]
docs: fix spelling mistakes

8 years agoloader: fix spelling mistakes
Eric Engestrom [Sat, 2 Apr 2016 21:06:24 +0000 (22:06 +0100)]
loader: fix spelling mistakes

8 years agolayers: fix spelling mistakes
Eric Engestrom [Sat, 2 Apr 2016 21:06:13 +0000 (22:06 +0100)]
layers: fix spelling mistakes

8 years agolayers: Enable safety check for invalid QueryObject
Mark Lobodzinski [Fri, 1 Apr 2016 21:58:32 +0000 (15:58 -0600)]
layers: Enable safety check for invalid QueryObject

Typo allowed object access for invalid QueryToStateMap objects

Change-Id: I50845ca09564ea8b77173d2165a5318160dd8d7e

8 years agolayers: LX414: Fix device_limits alignment check
Dustin Graves [Fri, 1 Apr 2016 00:01:37 +0000 (18:01 -0600)]
layers: LX414: Fix device_limits alignment check

Fix buffer/descriptor offset alignment checks in device_limits:
 - vkUpdateDescriptorSets offset check was not performed with
   the correct physical device alignments.
 - vkBindBufferMemory offset check was always performed with the
   UBO alignment.  This check has been moved to core_validation,
   where the offset is checked against the alignment associated
   with its usage type and the alignment retrieved from
   vkGetBufferMemoryRequirements.

Change-Id: I4f64e06c44972a224d1930cb0798a9f472b768f2

8 years agolayers: Fix param checker struct array handling
Dustin Graves [Thu, 31 Mar 2016 15:50:42 +0000 (09:50 -0600)]
layers: Fix param checker struct array handling

Fix parameter validation issue with arrays of structs, where only
the first item in the array was processed.  Validation messages
for arrays of structs will currently print the array variable name
with the letter 'i' as the array index instead of the actual index
number, producing a value like 'pCreateInfos[i]'.  This will be
fixed by a future update.

Change-Id: I2cb773c23c6515a20ac8cb066e7cc61028e569f8

8 years agolayers: Update param_checker VkResult validation
Dustin Graves [Fri, 25 Mar 2016 21:13:28 +0000 (15:13 -0600)]
layers: Update param_checker VkResult validation

VkResult validation now prints a description of the error
code being returned.

Change-Id: Ia6dc4e71ef6d1b27365e3c0499b24a3fc1d332ac

8 years agolayers: Codegen VkBool32/enum parameter validation
Dustin Graves [Thu, 24 Mar 2016 01:44:00 +0000 (19:44 -0600)]
layers: Codegen VkBool32/enum parameter validation

Now generating the VkBool32 and enum checks:
 - Warns if a VkBool32 parameter is neither VK_TRUE nor VK_FALSE
 - Warns if an enum token value falls outside of the enum's
   begin/end range and the token was not added by an extension.
   Only checkes enum's that have a begin/end range.  Detection
   of tokens added by extensions is based on the base_value defined
   in appendic C.10 of the Vulkan specification.

Change-Id: Id49ace52fea8a35972f96d54247b98aba182c09e

8 years agolayers: 1.0.7 update for XML Registry files
Dustin Graves [Mon, 28 Mar 2016 22:17:38 +0000 (16:17 -0600)]
layers: 1.0.7 update for XML Registry files

Update local copies of generator.py, genvk.py, and vk.xml with the
latest versions from Vulkan-Docs.

Change-Id: Id2a3da34374fb1c39532cd3c124461eb953f6b89

8 years agolayers: Fix VS2013 build
Dustin Graves [Fri, 1 Apr 2016 21:00:09 +0000 (15:00 -0600)]
layers: Fix VS2013 build

Add macro to enable/disable noexcept based on compiler support.
Solution from:
http://stackoverflow.com/questions/18387640/how-to-deal-with-noexcept-in-visual-studio

Change-Id: Ic2d22c9247b902d6e13120b17fc0b8647f079f7f

8 years agolayers: LX459,GH#99,#100, Fix semaphore reference count
Mark Lobodzinski [Fri, 1 Apr 2016 19:34:08 +0000 (13:34 -0600)]
layers: LX459,GH#99,#100, Fix semaphore reference count

QueueSubmit waitSemaphore refcounts were getting incremented instead of
decremented, resulting in invalid 'semaphore still in use' errors.

Change-Id: I8ac224115b8ee43637b8de4b377750b277cfd22b

8 years agoloader: report implicit instance extensions
Jeremy Hayes [Fri, 1 Apr 2016 17:40:26 +0000 (11:40 -0600)]
loader: report implicit instance extensions

GL74: vkEnumerateInstanceExtensionProperties should report implicit
instance extensions when pLayerName is NULL or an implicit layer name.

Change-Id: Iba7664a168e146c4b862468b6255cdc752cc8c77

8 years agolayers: LX250 Verify color and depth/stencil are different.
Mark Young [Wed, 30 Mar 2016 08:23:18 +0000 (02:23 -0600)]
layers: LX250 Verify color and depth/stencil are different.

Validate that the color and depth/stencil attachments in a
subpass are different.

Change-Id: I0010270e50334cd1dc5b275c29c76265f570b186

8 years ago#238: Fixes the "num samples mismatch" error being shown incorrectly for subpasses...
Dominik Witczak [Fri, 1 Apr 2016 11:19:49 +0000 (13:19 +0200)]
#238: Fixes the "num samples mismatch" error being shown incorrectly for subpasses with 0 attachments

8 years agolayers: Replace GLOBAL_CB_NODE::pMemObjList with unordered_set
Chris Forbes [Thu, 31 Mar 2016 05:11:28 +0000 (18:11 +1300)]
layers: Replace GLOBAL_CB_NODE::pMemObjList with unordered_set

One more std::list gone.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Get rid of a bunch of linked list copying when retiring CBs
Chris Forbes [Thu, 31 Mar 2016 05:03:56 +0000 (18:03 +1300)]
layers: Get rid of a bunch of linked list copying when retiring CBs

There was no reason to copy this.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: trivial: remove stray () from end of error message
Chris Forbes [Thu, 31 Mar 2016 05:02:29 +0000 (18:02 +1300)]
layers: trivial: remove stray () from end of error message

This wasn't describing a function; the () on the end is just nonsense.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Replace DEVICE_MEM_INFO::pCommandBufferBindings with
Chris Forbes [Thu, 31 Mar 2016 04:58:13 +0000 (17:58 +1300)]
layers: Replace DEVICE_MEM_INFO::pCommandBufferBindings with
unordered_set

More linked-list removal.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Replace DEVICE_MEM_INFO::pObjBindings with unordered_set
Chris Forbes [Thu, 31 Mar 2016 04:37:36 +0000 (17:37 +1300)]
layers: Replace DEVICE_MEM_INFO::pObjBindings with unordered_set

- Add operator== && std::hash specialization required for use in
  unordered_set.
- Replace list by unordered_set
- Delete piles of stuff

V2: Fix accidentally inverted error condition

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Get rid of DEVICE_MEM_INFO::refCount
Chris Forbes [Thu, 31 Mar 2016 04:06:52 +0000 (17:06 +1300)]
layers: Get rid of DEVICE_MEM_INFO::refCount

This is always the sum of the two container sizes, which are guaranteed
accessible in constant time in C++11.

We can only screw it up by independently tracking it.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoSPIRV: Adjust to spirv-tools library move
GregF [Fri, 1 Apr 2016 20:20:14 +0000 (14:20 -0600)]
SPIRV: Adjust to spirv-tools library move

8 years agolayers: Fix signed/unsigned comparison warnings in thread_check.h
Michael Mc Donnell [Fri, 18 Mar 2016 04:18:32 +0000 (21:18 -0700)]
layers: Fix signed/unsigned comparison warnings in thread_check.h

Change-Id: I3a5e8e64deed53b3817be1fe8e1e2b32c08691a7

8 years agoloader: vk{Create|Destroy}Instance can have multiple tmp callbacks
Ian Elliott [Thu, 31 Mar 2016 16:48:19 +0000 (10:48 -0600)]
loader: vk{Create|Destroy}Instance can have multiple tmp callbacks

During code review of the Android version of the temporary debug_report
callbacks code, it was decided to allow an array of
VkDebugReportCallbackCreateInfoEXT structs to be passed to vkCreateInstance().
This code implements that, using some new utility functions in order to help
keep the code clean.

8 years agodemos: Try for std val layer and fallback the same way tri does.
Karl Schultz [Fri, 1 Apr 2016 18:07:03 +0000 (12:07 -0600)]
demos: Try for std val layer and fallback the same way tri does.

Change-Id: I0835830fe887febec72da8af54a608b72cd63ecc

8 years agoloader: Fix createDev treminator to init the logicalDevs ICD dev
Jon Ashburn [Fri, 1 Apr 2016 17:49:39 +0000 (11:49 -0600)]
loader: Fix createDev treminator to init the logicalDevs ICD dev

Last commit on physDev detanglement was incompatible with the fix
to simplify the chaining loader_device_info.

Change-Id: I0468178bcffb114a9bf3038c773cf1912ad5ac72

8 years agoloader: Remove trampoline/terminator dependency in vkEnumeratePhysicalDevices
Piers Daniell [Tue, 29 Mar 2016 17:51:11 +0000 (11:51 -0600)]
loader: Remove trampoline/terminator dependency in vkEnumeratePhysicalDevices

There was a dependency between the trampoline vkEnumeratePhysicalDevices
and the terminator vkEnumeratePhysicalDevices via the
loader_instance.phys_devs_term array which may break layers that
manipulate the enumerated VkPhysicalDevice list. This dependency assumed
the devices in loader_instance.phys_devs_term and
loader_instance.phys_devs were in the same order and that it could
assume the index of one corresponding to the same VkPhysicalDevice of
the other.

Breaking this dependency allows layers to modify or reorder the
VkPhysicalDevice list by intercepting the vkEnumeratePhysicalDevices
function without causing the loader to crash. In general, there should
never be a dependency between the trampoline code and the terminator
code because it has the potential to break unknown layers between them.

Conflicts:
loader/loader.c
loader/trampoline.c

Change-Id: Iafefd6e8b7dd58d398a76533f957123242c01b56

8 years agoloader: Trampoline vkEnumeratePhysDev should use layer-returned physDev count
Piers Daniell [Thu, 31 Mar 2016 21:00:59 +0000 (15:00 -0600)]
loader: Trampoline vkEnumeratePhysDev should use layer-returned physDev count

Modify the trampoline vkEnumeratePhysicalDevices() implementation to
enumerate the number of physical devices based on what the top-most
layer reports and not what the terminator_EnumeratePhysicalDevices
counted. This allows intermediate layers to modify the physical device
count.

Change-Id: Ifd5c3c8c4db53cf97b976feefe18de7cfef47e35

8 years agoloader: Fix loader_unwrap_physical_device() to cast to correct type
Piers Daniell [Thu, 31 Mar 2016 20:47:57 +0000 (14:47 -0600)]
loader: Fix loader_unwrap_physical_device() to cast to correct type

The trampoline loader_unwrap_physical_device() utility function was
casting the VkPhysicalDevice parameter to (loader_physical_device*)
instead of (loader_physical_device_tramp*). It worked previously because
it just so happened that the phys_dev member was in the same location in
both structs.

Change-Id: I3bee175df8b64b44ef2e440f7e43603ca0617da2

8 years agoloader: Add device callback to set dispatchable object
Jon Ashburn [Thu, 31 Mar 2016 16:52:22 +0000 (10:52 -0600)]
loader: Add device callback to set dispatchable object

Change-Id: I5ca8f532e777e2cb0facf8fe5bab4c82409f8d37

8 years agoloader: Remove the device_info in the layer chain structure
Jon Ashburn [Tue, 29 Mar 2016 18:52:13 +0000 (12:52 -0600)]
loader: Remove the device_info in the layer chain structure

    Simplifies code, the loader device structure is passed down from
    trampoline code to terminator code via the pDevice parameter. It doesn't
    need to be added to this pCreatInfo pNext list structure.

    Layers which modifiy pDevice whould do it on the way up the chain not going
    down the chain.

Change-Id: Ibf7e4ffdc1a36f52b1a99389dcab25d572655aec

8 years agoloader: Add instance callback to set dispatchable objects
Jon Ashburn [Tue, 29 Mar 2016 17:16:01 +0000 (11:16 -0600)]
loader: Add instance callback to set dispatchable objects

Change-Id: I73b8b6edfee491c53216b730c99a7ea34ade3b4e

8 years agoloader: Remove the instance_info in the layer chain structure
Jon Ashburn [Mon, 28 Mar 2016 19:58:16 +0000 (13:58 -0600)]
loader: Remove the instance_info in the layer chain structure

Simplifies code, the loader instance structure is already passed down
from trampoline code to terminator code via the pInstance parameter. It doesn't
need to be added to this pCreatInfo pNext list structure.

Layers which modifiy pInstance whould do it on the way up the chain not going
down the chain.

Change-Id: I59581b94871c094995787808cf5ae2955ad0191a

8 years agolayers: GH218 Reset availableSets count in vkResetDescriptorPool
Tobin Ehlis [Wed, 30 Mar 2016 18:20:53 +0000 (12:20 -0600)]
layers: GH218 Reset availableSets count in vkResetDescriptorPool

8 years agolayers: Update layer validation doc for CopyImage validation additions
Mark Lobodzinski [Thu, 31 Mar 2016 16:44:49 +0000 (10:44 -0600)]
layers: Update layer validation doc for CopyImage validation additions

Change-Id: I045076fc7990e72389a45b432ae099010f4f5d48

8 years agolayers: LX458, Extend image extent validation for CmdCopyImage
Mark Lobodzinski [Tue, 29 Mar 2016 23:10:14 +0000 (17:10 -0600)]
layers: LX458, Extend image extent validation for CmdCopyImage

Also added many of the CmdCopyImage valid usage checks.

Change-Id: I398adf18b48eccacbd8e44ce53e50f3bf43f58ad

8 years agolayers: Accept a wider range of utf8 characters as valid
Tony Barbour [Thu, 31 Mar 2016 22:54:49 +0000 (16:54 -0600)]
layers: Accept a wider range of utf8 characters as valid

And keep from flagging the CTS tests as invalid

Change-Id: I46a3b1741ec2549b29fe72c1b0098593b2484490

8 years agotoolchain: Fix android build
Cody Northrop [Thu, 31 Mar 2016 22:33:00 +0000 (16:33 -0600)]
toolchain: Fix android build

Let's start tracking these revisions independent of desktop

8 years agolayers: Fix layer_validation_tests errors and update new message
Mark Young [Thu, 31 Mar 2016 22:03:20 +0000 (16:03 -0600)]
layers: Fix layer_validation_tests errors and update new message

Update the error message returned for the new color/blend
attachment compare, and fix tests Tobin discovered were
triggering early on the new error check.

Change-Id: I43c99a7db651632efde46a1ae17b5bfb4f424a78

8 years agolayers: LX265 Error if color blend attch count != subpass attch.
Mark Young [Wed, 30 Mar 2016 07:17:08 +0000 (01:17 -0600)]
layers: LX265 Error if color blend attch count != subpass attch.

Spec states that the VkPilelineColorBlendAttachmentState
attachmentCount must be equal to the subpass'
colorAttachmentCount.

Change-Id: I2b281cda2c12f2003d8ee68b326d78a9aaadf573

8 years agolayers: Adding attachment checks to make sure they aren't out of range.
Michael Lentine [Thu, 31 Mar 2016 19:45:20 +0000 (14:45 -0500)]
layers: Adding attachment checks to make sure they aren't out of range.

8 years agoDon't validate memory if used for both input and output.
Michael Lentine [Thu, 31 Mar 2016 18:46:44 +0000 (13:46 -0500)]
Don't validate memory if used for both input and output.

8 years agoTurn off XLIB define
Tony Barbour [Thu, 31 Mar 2016 19:21:02 +0000 (13:21 -0600)]
Turn off XLIB define

Defining XLIB causes generated layers to silently fail to load

Change-Id: Id630465507383bd61e4e80c184e991ca8e9a1ac8

8 years agolayers: Fix remaining leak in vkDestroyFramebuffers
Chris Forbes [Thu, 31 Mar 2016 03:13:36 +0000 (16:13 +1300)]
layers: Fix remaining leak in vkDestroyFramebuffers

Also simplify & fix the thread safety of this function.
DestroyFramebuffers should not be in anybody's hot path -- and we
absolutely /must/ hold the mutex to touch these maps, so throw away all
the weird unlocking & relocking; just do it the simple way.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Don't leak a VkFramebufferCreateInfo from vkCreateFramebuffer
Chris Forbes [Thu, 31 Mar 2016 03:05:02 +0000 (16:05 +1300)]
layers: Don't leak a VkFramebufferCreateInfo from vkCreateFramebuffer

This allocated and then immediately leaked localFBCI.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Fix the other half of #212 (bad error)
Chris Forbes [Wed, 30 Mar 2016 22:47:29 +0000 (11:47 +1300)]
layers: Fix the other half of #212 (bad error)

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Don't stash pointer to caller memory in bound function
Chris Forbes [Wed, 30 Mar 2016 22:22:37 +0000 (11:22 +1300)]
layers: Don't stash pointer to caller memory in bound function

We were already accumulating all the events the CB touches -- so just
pass an index into that.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoSPIR-V: Update glslang and spriv-tools to latest
GregF [Thu, 31 Mar 2016 18:11:06 +0000 (12:11 -0600)]
SPIR-V: Update glslang and spriv-tools to latest

8 years agowinrtinstaller: fix typos in windowsRuntimeInstaller/README.txt
David Pinedo [Wed, 30 Mar 2016 16:13:05 +0000 (10:13 -0600)]
winrtinstaller: fix typos in windowsRuntimeInstaller/README.txt

8 years agolayers: GH215 Removes an invalid check in vkCmdBindDescriptorSets()
Dominik Witczak [Wed, 30 Mar 2016 13:11:53 +0000 (15:11 +0200)]
layers: GH215 Removes an invalid check in vkCmdBindDescriptorSets()

8 years agodocs: Add OSX and Android build steps
Cody Northrop [Tue, 29 Mar 2016 16:31:40 +0000 (10:31 -0600)]
docs: Add OSX and Android build steps

8 years agotoolchain: Add Android specific update scripts
Cody Northrop [Tue, 29 Mar 2016 16:06:49 +0000 (10:06 -0600)]
toolchain: Add Android specific update scripts

Pulls in shaderc dependency automatically.

8 years agolayers: Update descriptor tracking in core_validation
Tobin Ehlis [Fri, 25 Mar 2016 17:49:51 +0000 (11:49 -0600)]
layers: Update descriptor tracking in core_validation

Old mem_tracker code to record updated storage image/buffers was naive in
that is gathered any image/buffer updates to descriptor sets and marked as
updated every such image/buffer that was referenced by currently bound sets.

In reality sets may be bound but not used. This is captured in the
"active_slots" construct of the pipeline.

The code here updates tracking for the updated buffers by waiting until
a draw cmd for gfx pipe or dispatch cmd for compute pipe, and then gathering
the updated images/buffers based on which slots are active.

I've multi-purposed validate_draw_state() to now be
validate_and_update_draw_state() as it includes recording of the images/buffers
from the active_slots, which is then used to mark those as read.
Also, that same function is now being called for compute dispatch cmds so
"draw" state is not ideal.
There is still some rework that needs to be done to improve this situation.

8 years ago#37: vkAcquireNextImageKHR() will no longer treat VK_NULL_HANDLE arg as a valid semap...
Dominik Witczak [Wed, 30 Mar 2016 11:59:48 +0000 (13:59 +0200)]
#37: vkAcquireNextImageKHR() will no longer treat VK_NULL_HANDLE arg as a valid semaphore handle

8 years agolayers: Build up next layer for compute shader validation
Chris Forbes [Wed, 30 Mar 2016 01:04:36 +0000 (14:04 +1300)]
layers: Build up next layer for compute shader validation

Only remaining piece now is to actually call this from
vkCreateComputePipelines!

Signed-off-by: Chris Forbes <chrisforbes@google.com>