platform/upstream/Vulkan-Tools.git
8 years agomisc: Update licenses to Apache 2.0
Jon Ashburn [Tue, 19 Apr 2016 17:30:31 +0000 (11:30 -0600)]
misc: Update licenses to Apache 2.0

Change-Id: Id447f4c8c53d33f9192940bdd3ae727b7b738a97

8 years agolayers: LX468, Prevent bad core_validation error message
Mark Lobodzinski [Tue, 12 Apr 2016 16:41:59 +0000 (10:41 -0600)]
layers: LX468, Prevent bad core_validation error message

Properly track commandBuffer/FrameBuffer references.

Change-Id: Ibbc078b582b204bee26cdc510575c57023cf9d6b

8 years agoUpdate typo in doc
ttyio [Sun, 10 Apr 2016 14:09:44 +0000 (22:09 +0800)]
Update typo in doc

8 years agolayers: Fix object_tracker bugs
Tobin Ehlis [Mon, 18 Apr 2016 21:40:59 +0000 (15:40 -0600)]
layers: Fix object_tracker bugs

A couple of bugs in object_tracker hand-coded sections that MarkY tracked down.
In DestroyInstance case we were attempting to delete wrong map key.
Then, for vkDestroyCommandPool we were using wrong function to clean-up the
command buffers in that pool which would result in occassional crashes.

8 years agodoc: fix typos in doc
David Pinedo [Mon, 18 Apr 2016 22:59:59 +0000 (16:59 -0600)]
doc: fix typos in doc

8 years agolayers: Make logicOp param validation conditional
Dustin Graves [Sat, 16 Apr 2016 00:06:14 +0000 (18:06 -0600)]
layers: Make logicOp param validation conditional

- Only validate that VkPipelineColorBlendStateCreateInfo::logicOp is
  a valid VkLogicOp enumeration value when
  VkPipelineColorBlendStateCreateInfo::logicOpEnable is set to VK_TRUE.
- Remove redundant VkPipelineColorBlendStateCreateInfo validation (hand
  written code replaced by generated code).

Change-Id: I075c58342678219c5ed1dd5c401e0da2cea53232

8 years agolayers: Improved generated struct validation code
Dustin Graves [Thu, 14 Apr 2016 21:03:31 +0000 (15:03 -0600)]
layers: Improved generated struct validation code

Improvements to the parameter validation code generator, primarily to
eliminate string concatenations performed when processing structs.  A
validation function was being produced for each struct, which received a
string specifying the name of the struct parameter.  This string was then
concatenated with the names of the struct members.  The struct validation
code is no longer in a separate function, and a single string containing
the full names of each struct member (eg. pCreateInfo->pApplicationInfo)
is created at code generation time.

Change-Id: I2800bfbc26247e4e4c6f8c885c0e7c4b8b3776a2

8 years agolayers: Simplify generated param validation code
Dustin Graves [Mon, 11 Apr 2016 22:06:25 +0000 (16:06 -0600)]
layers: Simplify generated param validation code

- Remove unnecessary conditional checks for input vs. output parameters
  from the generated C++ code.
- Split some generator code into smaller functions.

Change-Id: I32e47d417ab884e5cc0fc7af40cb5657b39c176d

8 years agolayers: core_validation - use std mutex
Jeremy Hayes [Wed, 13 Apr 2016 22:20:24 +0000 (16:20 -0600)]
layers: core_validation - use std mutex

Change-Id: I88af1e86c0ef93dbeab303977b8190ad1968c00d

8 years agolayers: swapchain - use std mutex
Jeremy Hayes [Wed, 13 Apr 2016 17:57:20 +0000 (11:57 -0600)]
layers: swapchain - use std mutex

Change-Id: I2c5584a5d36edc097b061db2e49fba2505bd1d65

8 years agolayers: object_tracker - use std mutex
Jeremy Hayes [Wed, 13 Apr 2016 16:54:17 +0000 (10:54 -0600)]
layers: object_tracker - use std mutex

Change-Id: I5f9ed9dc92daccaada895808e3fea3189ef81212

8 years agolayers: threading - use std mutex
Jeremy Hayes [Tue, 12 Apr 2016 19:48:52 +0000 (13:48 -0600)]
layers: threading - use std mutex

Change-Id: I773ea148807e5b634ad021ea58b001cd3d1bad87

8 years agolayers: image - use std mutex
Jeremy Hayes [Fri, 8 Apr 2016 15:53:54 +0000 (09:53 -0600)]
layers: image - use std mutex

Change-Id: Ie132289c0e601397f54b06c1ef758c65b712f906

8 years agolayers: Correctly remove secondary cmd buffers from in-flight
Tobin Ehlis [Thu, 14 Apr 2016 18:22:03 +0000 (12:22 -0600)]
layers: Correctly remove secondary cmd buffers from in-flight

Secondary command buffers are considered executing, or "in-flight"
at the time they're bound into a primary command buffer. This leads
to a couple of corner case bugs if the primary command buffer is
never submitted on a queue. This change fixes those bugs:

1. If a secondary cmd buffer is being freed and is in the global
in-flight set, remove it if associated primary is not in-flight
2. When a primary cmd buffer is reset, remove its secondary
cmd buffers from in-flight

8 years agolayers: Fix vkResetDescriptorPool
Tobin Ehlis [Fri, 15 Apr 2016 17:59:39 +0000 (11:59 -0600)]
layers: Fix vkResetDescriptorPool

When we reset descriptor pool, need to remove the allocated
descriptors from setMap and free them.

8 years agoRevert "loader: Temp workaround to add WSI surface extensions enumerated."
Jon Ashburn [Fri, 15 Apr 2016 22:24:44 +0000 (16:24 -0600)]
Revert "loader: Temp workaround to add WSI surface extensions enumerated."

This reverts commit 884065fcd89540dca9a710389641bf1c39cedce0.

8 years agoRevert "loader: temp workaround for advertising linux wsi surface extensions"
Jon Ashburn [Fri, 15 Apr 2016 22:24:12 +0000 (16:24 -0600)]
Revert "loader: temp workaround for advertising linux wsi surface extensions"

This reverts commit 23b248d32c943c136589e679e1fcc3444488d906.

8 years agolayers: Update JSON files to 1.0.10
Jon Ashburn [Fri, 15 Apr 2016 22:02:07 +0000 (16:02 -0600)]
layers: Update JSON files to 1.0.10

Change-Id: I2020999bac6090fe40688f977f15c9818b828cf4

8 years agoheader: Update to 1.0.10 header
Jon Ashburn [Fri, 15 Apr 2016 21:51:08 +0000 (15:51 -0600)]
header: Update to 1.0.10 header
No functional changes.

Change-Id: Ia57a172a2ab0c7e082ad30aef64354cd1427b528

8 years agoloader: Remove the default directory paths for ICDs and layers
Jon Ashburn [Fri, 15 Apr 2016 19:19:43 +0000 (13:19 -0600)]
loader: Remove the default directory paths for ICDs and layers

These are not needed since rely on OSes library loader to figure out default path.

Change-Id: Ide5eec4ed4301c51de7dc9171f7e040deb1878e7

8 years agodocs: Add libx11-dev to linux build dependencies
Karl Schultz [Fri, 15 Apr 2016 19:04:05 +0000 (13:04 -0600)]
docs: Add libx11-dev to linux build dependencies

8 years agoloader: Run clang-format
Jon Ashburn [Fri, 15 Apr 2016 15:25:03 +0000 (09:25 -0600)]
loader: Run clang-format

Last several commits to loader weren't run through it.

Change-Id: I512b2df75c7831ee6433e4c60c6664db85184584

8 years agolayers: Fix 32-bit VS2013 build
Dustin Graves [Thu, 14 Apr 2016 23:29:20 +0000 (17:29 -0600)]
layers: Fix 32-bit VS2013 build

Change reinterpret_cast<uint64_t> to reinterpret_cast<uint64_t&> for
unique_objects generated and static code.

Change-Id: I8be5680063ce8a26b58c444e59cb325c4cf6e98b

8 years agoloader: `Remove the ICD and Layers search path for Windows
Piers Daniell [Thu, 14 Apr 2016 22:57:06 +0000 (16:57 -0600)]
loader: `Remove the ICD and Layers search path for Windows

This makes it more like Linux which leaves it up to the system
LoadLibrary() call to find the .dll as specified in the .json files.
Hard-coding "C:" or any other search path creates the possibility of
picking up the wrong .dll. The LoadLibrary() implementation does the
right thing.

Change-Id: I58cbdf230a1e86481067efb4aec03447ee55f1ff

8 years agoloader: dont free and reallocate physical devices
Jeannot Breton [Tue, 12 Apr 2016 20:46:20 +0000 (15:46 -0500)]
loader: dont free and reallocate physical devices

Change-Id: I68ac2681b7c4923213c65dc720f54d81a36c99ef

8 years agolayers: Fix lx474 by adding image extent = 0 validation check.
Mark Young [Mon, 11 Apr 2016 20:26:49 +0000 (14:26 -0600)]
layers: Fix lx474 by adding image extent = 0 validation check.

Check only the valid dimensions for the imageType provided in
the create info.

Change-Id: I11d484caf1085b7b0ae4a402453b5fdcadd7b67d

8 years agolayers: Overhaul unique_objects
Tobin Ehlis [Wed, 13 Apr 2016 18:59:43 +0000 (12:59 -0600)]
layers: Overhaul unique_objects

Unique objects now uses a 64-bit counter as the unique handle returned
to the app. It stores an internal mapping of handles to actual object
ptrs that are used for all non-dispatchable objects. This virtually
eliminates the possibility of having a repeat handle as objects
are created and destroyed.

All counter increments and map accesses are protected by a mutex.

8 years agodemos: Init var in tri.c
Tobin Ehlis [Wed, 13 Apr 2016 18:59:08 +0000 (12:59 -0600)]
demos: Init var in tri.c

8 years agolayers: Remove error when only implicit dependencies are used.
Michael Lentine [Thu, 14 Apr 2016 19:46:28 +0000 (14:46 -0500)]
layers: Remove error when only implicit dependencies are used.

8 years agolayers: Validate ONE_TIME_SUBMIT for secondary cmd buffers
Tobin Ehlis [Thu, 14 Apr 2016 21:44:20 +0000 (15:44 -0600)]
layers: Validate ONE_TIME_SUBMIT for secondary cmd buffers

Previously were only validating *_ONE_TIME_SUBMIT_BIT for primary cmd buffers.
After clarification on spec, moving the check so it will also hit secondary
command buffers.

8 years agolayers: Update core_validation to fix lx265.
Mark Young [Mon, 11 Apr 2016 20:11:46 +0000 (14:11 -0600)]
layers: Update core_validation to fix lx265.

Tobin discovered an issue with my previous change.  This resolves
the issue with the blend state targeting only a specific subpass
and verifying the subpass attachment count matches the blend
attachment count.

Change-Id: Iacdd880dde32267da095a3e9baa9e8eb66fdc760

8 years agolayers: lx464 Add drawtime validation of bound buffer memory.
Mark Young [Mon, 11 Apr 2016 23:45:37 +0000 (17:45 -0600)]
layers: lx464 Add drawtime validation of bound buffer memory.

Add a drawtime check to validate that storage or uniform buffers
have valid memory bound to them at draw time before using.

Change-Id: Ia0a07f221dfcb2ea4315e4f52ee04d7cdda22cf7

8 years agolayers: lx465 update core_validation image layout warning.
Mark Young [Mon, 11 Apr 2016 22:53:53 +0000 (16:53 -0600)]
layers: lx465 update core_validation image layout warning.

If sub-resource data is present, print out that info as part of
the error message when the image layout is incorrect.

Change-Id: Ibd4d95e22d846b823b5c76986e8646624c109bc6

8 years agoloader: Added some missing function entry points to loader_icd_init_entrys.
Petros Bantolas [Thu, 14 Apr 2016 11:50:42 +0000 (12:50 +0100)]
loader: Added some missing function entry points to loader_icd_init_entrys.

KHR_surface, KHR_display extension functions were not exposed properly.
Specifically, added LOOKUP_GIPA entries for:

* GetPhysicalDeviceDisplayPropertiesKHR
* GetDisplayModePropertiesKHR
* CreateDisplayPlaneSurfaceKHR
* GetPhysicalDeviceDisplayPlanePropertiesKHR
* GetDisplayPlaneSupportedDisplaysKHR
* CreateDisplayModeKHR
* GetDisplayPlaneCapabilitiesKHR
* DestroySurfaceKHR

Added missing function declaration DestroySurfaceKHR in loader_icd
struct.

Checking if KHR_surface extension is enabled before proceeding in the
terminator_CreateDisplayPlaneSurfaceKHR definition.

Change-Id: I0599efddedc5064859ae1f4e52bdbbf8788d5c12

8 years agolayers: LX466. Resolution of "Typo in validation layer", human spell checker invoked
Mark Mueller [Thu, 14 Apr 2016 17:01:58 +0000 (11:01 -0600)]
layers: LX466. Resolution of "Typo in validation layer", human spell checker invoked

8 years agolayers: Fix windows build
Mark Lobodzinski [Thu, 14 Apr 2016 17:30:32 +0000 (11:30 -0600)]
layers: Fix windows build

VkObjects should be cast to uint64_t by using 'reinterpret_cast<uint64_t &>'

Change-Id: I403efdf389dad61c373df40c5fa1fbed7cf96abd

8 years agolayers: GH337 Track fence from vkQueueBindSparse
Tobin Ehlis [Thu, 14 Apr 2016 13:02:43 +0000 (07:02 -0600)]
layers: GH337 Track fence from vkQueueBindSparse

Correctly update fence tracking for vkQueueBindSparse() call.

8 years agolayers: replace remaining set with unordered_set
Chris Forbes [Wed, 13 Apr 2016 22:34:17 +0000 (10:34 +1200)]
layers: replace remaining set with unordered_set

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: only construct stringstreams in error paths
Chris Forbes [Wed, 13 Apr 2016 22:30:01 +0000 (10:30 +1200)]
layers: only construct stringstreams in error paths

These are actually stupidly expensive to construct -- with most of the
cost going to the contained std::locale.

Added up to about 6% of profile on my machine in `smoke -s` with
VK_LAYER_LUNARG_core_validation enabled.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Validate correct vkSetEvent() use
Tobin Ehlis [Wed, 13 Apr 2016 22:18:28 +0000 (16:18 -0600)]
layers: Validate correct vkSetEvent() use

Make sure vkSetEvent() is not called on an event that's in use
by and in-flight cmd buffer. Such use violates queue forward progress.

8 years agolayers: Change access bit checks to warnings.
Michael Lentine [Wed, 13 Apr 2016 22:12:57 +0000 (17:12 -0500)]
layers: Change access bit checks to warnings.

8 years agolayers: Include all 4 Linux WSI interfaces
Tony Barbour [Tue, 12 Apr 2016 19:35:51 +0000 (13:35 -0600)]
layers: Include all 4 Linux WSI interfaces

Change-Id: I20b0d64c90e6da940f45b31abf0330b2a415655d

8 years agolayers: Update typo in comment
ttyio [Sun, 10 Apr 2016 14:07:28 +0000 (22:07 +0800)]
layers: Update typo in comment

8 years agolayers: Fix comment indentation & remove tabs
Tobin Ehlis [Wed, 13 Apr 2016 21:15:09 +0000 (15:15 -0600)]
layers: Fix comment indentation & remove tabs

8 years agolayers: cv: get rid of device-scoped current renderpass tracking
Chris Forbes [Wed, 13 Apr 2016 04:56:05 +0000 (16:56 +1200)]
layers: cv: get rid of device-scoped current renderpass tracking

This was completely redundant to the (correct) CB-scoped renderpass
tracking, and only served to break things when different threads
simultaneously recorded command buffers.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Fix vkCreateDescriptorPool max allocation sizes for each type
Norbert Nopper [Tue, 12 Apr 2016 23:08:36 +0000 (01:08 +0200)]
layers: Fix vkCreateDescriptorPool max allocation sizes for each type

VkDescriptorPoolSize array can contain more than one of same VkDescriptorType

8 years agoRevert "layers: LX459,GH#99,#100, Fix semaphore reference count"
Tobin Ehlis [Wed, 13 Apr 2016 20:36:16 +0000 (14:36 -0600)]
Revert "layers: LX459,GH#99,#100, Fix semaphore reference count"

This reverts commit 541bb5afc50581e7c765fc5c05400540369f0044.

Reverting this as the original issue is still present and being worked on
so restoring original state until correct fix is complete.

8 years agolayers: Clean up semaphore state in core_validation
Tobin Ehlis [Tue, 12 Apr 2016 16:49:41 +0000 (10:49 -0600)]
layers: Clean up semaphore state in core_validation

No need to have 3 semaphore states. Killed SemaphoreState struct and
updated all the code to just use the "signaled" bool.

Also minor clean-up of queueMap destroy code.

8 years agolayers: Cleanup of various cmd buffer functions in core_validation
Tobin Ehlis [Mon, 11 Apr 2016 22:39:29 +0000 (16:39 -0600)]
layers: Cleanup of various cmd buffer functions in core_validation

Killed some mem_tracker functions that were doing redundant work.
Removed some calls to checkCBCompleted that were superceded by
validateCommandBuffersNotInUse() calls.
Clarified some "my_data" vars as "dev_data."

8 years agolayers: Cleanup core_validation physical device properties structs
Tobin Ehlis [Mon, 11 Apr 2016 20:49:55 +0000 (14:49 -0600)]
layers: Cleanup core_validation physical device properties structs

Pull physical device memory properties into layer_data and make sure it's
correctly populated at vkCreateDevice() time.
Clarify a few ambiguous "my_data" variables as "dev" or "instance".
Rename physical device properties to be lower case. This is the start of
a slow move to unify code on common standard with lowercase variable names.

8 years agoWindows build: Add arg processing to select targets to build.
Karl Schultz [Mon, 11 Apr 2016 19:29:05 +0000 (13:29 -0600)]
Windows build: Add arg processing to select targets to build.

8 years agolayers: renderpass compatibility: there is only one d/s attachment
Chris Forbes [Mon, 11 Apr 2016 06:32:23 +0000 (18:32 +1200)]
layers: renderpass compatibility: there is only one d/s attachment

Previously this function assumed there were as many d/s attachments as
color attachments, which is invalid. Besides not making sense, we'd end
up dereferencing memory beyond that pointed to by
VkSubpassDescription::pDepthStencilAttachment if we had multiple color
attachments.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agowinrtinstaller: correction of File Description Properties of uninstaller.exe
David Pinedo [Fri, 8 Apr 2016 22:33:29 +0000 (16:33 -0600)]
winrtinstaller: correction of File Description Properties of uninstaller.exe

8 years agoloader: ghlvl #66, Ensure std_validationadvertises underlying layer extensions
Jon Ashburn [Fri, 8 Apr 2016 21:03:35 +0000 (15:03 -0600)]
loader: ghlvl #66, Ensure std_validationadvertises underlying layer extensions

Change-Id: If6b6b24fdf02b960c83148bd002114941eb1adc6

8 years agolayers: Use real enum value for alignment checks in device_limits
Chris Forbes [Thu, 7 Apr 2016 00:00:33 +0000 (12:00 +1200)]
layers: Use real enum value for alignment checks in device_limits

Previously this used '1'.

Also clean up the enum, and description of device_limits checks.

Found by inspection while reviewing #290.

Change-Id: I710d9b8fad0ca027eb3de67b6c2c70b5628af5a5
Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agobuild: rename layers utils lib and fix Windows CMake code
Karl Schultz [Fri, 8 Apr 2016 15:17:18 +0000 (09:17 -0600)]
build: rename layers utils lib and fix Windows CMake code

Rename utils lib to VkLayer_utils to use same namespace as
the layers.
The previous Windows CMake code attempted to build both
dynamic and static utils libs, succeeding with only the static.
Change the CMake code to only attempt to build the static lib.

8 years agoChange from using lxml to xml.etree
Mike Stroyan [Tue, 5 Apr 2016 22:40:30 +0000 (16:40 -0600)]
Change from using lxml to xml.etree

Use xml.etree for xml parsing for greater portability.

Change-Id: Ic9b3b487e9b363a89d134d048db9fa79fbd66f6f

8 years agolayers: sort dictionaries affecting code order
Mike Stroyan [Thu, 7 Apr 2016 18:14:30 +0000 (12:14 -0600)]
layers: sort dictionaries affecting code order

Sort python dictionaries that are used in vk-layer-generate.py
which otherwise produce source code with unpredictable order.

Change-Id: I9b26fa61325098998ff510063a649414807d1378

8 years agolayers: remove unicode header from vk-layer-generate.py
Mike Stroyan [Thu, 7 Apr 2016 18:07:41 +0000 (12:07 -0600)]
layers: remove unicode header from vk-layer-generate.py

A unicode header snuck into the front of vk-layer-generate.py.
It does not belong there.

Change-Id: Iad04156d0ed9a0e0c880f88a259b7f5f76406b1d

8 years agowinrtinstaller: don't delete non-SDK layer registry values during install
David Pinedo [Thu, 7 Apr 2016 21:54:59 +0000 (15:54 -0600)]
winrtinstaller: don't delete non-SDK layer registry values during install

8 years agobuild: Fix whitespace
Karl Schultz [Thu, 7 Apr 2016 21:11:59 +0000 (15:11 -0600)]
build: Fix whitespace

8 years agoandroid: Update to get gradlew working again
Cody Northrop [Thu, 7 Apr 2016 19:50:07 +0000 (13:50 -0600)]
android: Update to get gradlew working again

8 years agoandroid: Update documentation
Cody Northrop [Thu, 7 Apr 2016 18:33:21 +0000 (12:33 -0600)]
android: Update documentation

8 years agoandroid: Clean up Android.mk
Cody Northrop [Thu, 7 Apr 2016 17:54:50 +0000 (11:54 -0600)]
android: Clean up Android.mk

8 years agoandroid: Fix typo in Mac steps
Cody Northrop [Thu, 7 Apr 2016 17:22:11 +0000 (11:22 -0600)]
android: Fix typo in Mac steps

8 years agoandroid: minor indentation correction in Android.mk
guanghuafan [Thu, 31 Mar 2016 22:31:02 +0000 (15:31 -0700)]
android: minor indentation correction in Android.mk

8 years agoandroid: Minor clean up for windows build template
guanghuafan [Thu, 31 Mar 2016 20:02:11 +0000 (13:02 -0700)]
android: Minor clean up for windows build template

8 years agoandroid: fixed issues in windows build
guanghuafan [Thu, 31 Mar 2016 19:02:44 +0000 (12:02 -0700)]
android: fixed issues in windows build

tested: windows/mac

8 years agoandroid: set hard float for arm7 correctly and minor cleanup
guanghuafan [Thu, 31 Mar 2016 14:49:00 +0000 (07:49 -0700)]
android: set hard float for arm7 correctly and minor cleanup

tested: Mac X

8 years agoandroid: Changed android-generated.bat for windows (not tested )
guanghuafan [Thu, 31 Mar 2016 04:16:13 +0000 (21:16 -0700)]
android: Changed android-generated.bat for windows (not tested )

8 years agoandroid: Adding template for gradle wrapper build
guanghuafan [Tue, 29 Mar 2016 18:08:23 +0000 (11:08 -0700)]
android: Adding template for gradle wrapper build

8 years agolayers: GH241 vkSetEvent should affect queue stageMasks
Tobin Ehlis [Thu, 7 Apr 2016 17:35:46 +0000 (11:35 -0600)]
layers: GH241 vkSetEvent should affect queue stageMasks

vkSetEvent may occur asynchronously from cmd buffer execution
and the results of vkSetEvent should be immediately visible
across all queues of a device.

This fix will update any event that a queue has seen so that
its VK_PIPELINE_STAGE_HOST_BIT is set at vkSetEvent() time.

8 years agoloader: Fix the std_validation version to really be loader's built version
Jon Ashburn [Thu, 7 Apr 2016 17:57:03 +0000 (11:57 -0600)]
loader: Fix the std_validation version to really be loader's built version

Change-Id: I2ff3b6dab4209b152f487649db011cdfa7c8975b

8 years agowinrtinstaller: re-sign powershell script
David Pinedo [Thu, 7 Apr 2016 17:28:30 +0000 (11:28 -0600)]
winrtinstaller: re-sign powershell script

8 years agolayers: INVALID_ATTACH_COUNT -> INVALID_ATTACHMENT_COUNT
Karl Schultz [Thu, 7 Apr 2016 16:52:43 +0000 (10:52 -0600)]
layers:  INVALID_ATTACH_COUNT -> INVALID_ATTACHMENT_COUNT

Fix error reported by vkvalidatelayerdoc test.

Change-Id: I7e1bb4e5cb8c113202d479ef95cc0d37334040b1

8 years agoloader: Preserve order during layer list expansion
Chris Forbes [Wed, 6 Apr 2016 21:04:49 +0000 (09:04 +1200)]
loader: Preserve order during layer list expansion

As requested by Jon -- instead of appending the expanded layers, insert
them in place of the meta layer.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoloader: Don't scribble on caller memory in CreateInstance,CreateDevice
Chris Forbes [Wed, 6 Apr 2016 08:49:02 +0000 (20:49 +1200)]
loader: Don't scribble on caller memory in CreateInstance,CreateDevice

expand_... / unexpand_... scribbled on both the CreateInfo struct and
the list of layer strings, and then unscribbled them on the way back
out. This is a lousy thing to do, and just blows up if the memory isn't
writable (which it needn't be, given the API takes ptrs to const).

Instead, copy the *CreateInfo into a shadow struct on the stack, and be
careful in expand_layer_names never to scribble on the caller's layer
names array.

V2: slight tweak (missed initializer)

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodemos: Add missing spaces in error messages.
Karl Schultz [Thu, 7 Apr 2016 15:40:30 +0000 (09:40 -0600)]
demos: Add missing spaces in error messages.

Change-Id: Ic9b2b2a2ea14bb087d74f6c0b697449b141899a4

8 years agoMR 289: layers: Changed other text/variables from "owned" to "acquired".
Ian Elliott [Thu, 7 Apr 2016 15:05:45 +0000 (09:05 -0600)]
MR 289: layers: Changed other text/variables from "owned" to "acquired".

8 years agoMR 289: layers: Change the test about "too many images".
Ian Elliott [Wed, 6 Apr 2016 20:29:56 +0000 (14:29 -0600)]
MR 289: layers: Change the test about "too many images".

Given new spec language coming out in early April (clarifying various aspects
of acquiring presentable images), a change was needed to the WSI-swapchain
validation layer.  The new validate-layer test will work for "BlitModel"
drivers that advertise a minImageCount of 1.  Failing the test now results in
an error instead of a performance warning.

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