platform/upstream/Vulkan-Tools.git
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>
8 years agolayers: More slight tidying of SC pass
Chris Forbes [Wed, 30 Mar 2016 00:21:20 +0000 (13:21 +1300)]
layers: More slight tidying of SC pass

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Make some SC error reporting slightly less misleading
Chris Forbes [Wed, 30 Mar 2016 00:14:22 +0000 (13:14 +1300)]
layers: Make some SC error reporting slightly less misleading

We were reporting that device 0 was interesting. This is nonsense.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Separate out validation of a single pipeline stage
Chris Forbes [Tue, 29 Mar 2016 23:12:01 +0000 (12:12 +1300)]
layers: Separate out validation of a single pipeline stage

This is setting the scene for being able to validate compute shaders

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Add device handle in CV layer data
Chris Forbes [Tue, 29 Mar 2016 22:35:21 +0000 (11:35 +1300)]
layers: Add device handle in CV layer data

Avoids having to pass this around quite so much.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Remove dead render_pass forward declaration
Chris Forbes [Tue, 29 Mar 2016 22:14:13 +0000 (11:14 +1300)]
layers: Remove dead render_pass forward declaration

This went away at the same time as the SC/DS merge.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Reduce noise in string conversion of objects
Chris Forbes [Tue, 29 Mar 2016 21:20:37 +0000 (10:20 +1300)]
layers: Reduce noise in string conversion of objects

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: remove unused getTIDIndex function and associated data
Chris Forbes [Tue, 29 Mar 2016 21:18:33 +0000 (10:18 +1300)]
layers: remove unused getTIDIndex function and associated data

This produces warning noise and nobody uses it.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: LX446, Allow GetDeviceQueue to be called multiple times
Mark Lobodzinski [Tue, 29 Mar 2016 15:49:15 +0000 (09:49 -0600)]
layers: LX446, Allow GetDeviceQueue to be called multiple times

Calling this API more than once on the same queue hoses the fence
validation. Also switched queues container from vector to unordered set.

Change-Id: I524347fd11d3b30a66004cf62937d0446e70df22

8 years agolayers: Relax descriptor type match for texel buffers slightly
Chris Forbes [Thu, 24 Mar 2016 01:14:45 +0000 (14:14 +1300)]
layers: Relax descriptor type match for texel buffers slightly

The descriptor doesn't really provide a sampler, but the consuming code
doesn't really look at one either.

Allow VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER to match against
OpTypeSampledImage with an image type having Dim=Buffer and Sampled=1.

8 years agolayers: GH195 Fix core_validation dynamic state checks
Tobin Ehlis [Mon, 28 Mar 2016 17:18:19 +0000 (11:18 -0600)]
layers: GH195 Fix core_validation dynamic state checks

Overhauled validation of dynamic state based on latest details in the
VkPipelineDynamicStateCreateInfo section of the spec.
Because some of the state checks need to be predicated on different pipeline
state, removed the previous flag-based system for check predication and
made it more clear and explicit exactly which pipeline states were gating
each dynamic state check with "if" clauses in validate_draw_state_flags().

The biggest change here is for blend constants, which was the focus of the
referenced GH195. For this case, added blendConstantsEnabled bool to
PIPELINE_NODE and enable it by loop through all attachments to identify if
any have blendEnable set and use the blend constant in any of their
blendFactors.

Also updated all the tests that were affected by this change.

Change-Id: Iaba5d28986c83547575be1ff70b9ae7602435417

8 years agowinrtinstaller: removed vulkaninfo from RT Start Menu
David Pinedo [Tue, 29 Mar 2016 22:29:00 +0000 (16:29 -0600)]
winrtinstaller: removed vulkaninfo from RT Start Menu

8 years agowinrtinstaller: convert RT installer log file to ascii
David Pinedo [Tue, 29 Mar 2016 22:26:50 +0000 (16:26 -0600)]
winrtinstaller: convert RT installer log file to ascii

8 years agolayers: Improve core_validation image layout error message
Mark Lobodzinski [Fri, 25 Mar 2016 21:22:33 +0000 (15:22 -0600)]
layers: Improve core_validation image layout error message

Change-Id: I1e22ef9be4b1d8b22765e1150f828904334380eb

8 years agolayers: Michael's fix for uninit'd data in FindLayout
Mark Lobodzinski [Mon, 28 Mar 2016 20:34:40 +0000 (14:34 -0600)]
layers: Michael's fix for uninit'd data in FindLayout

Change-Id: Ia34d036e15a08c135cf3fb0ea4a80c12f2201ec7

8 years agoRemove device from layer_data_map at destroy in parameter_validation
Tony Barbour [Tue, 29 Mar 2016 21:14:59 +0000 (15:14 -0600)]
Remove device from layer_data_map at destroy in parameter_validation

Change-Id: I964302597c0cbcbb7bb8c73d55fd6b00ebe0e765