platform/upstream/Vulkan-Tools.git
8 years agowinrtinstaller: Add logging support to Windows Runtime Installer
David Pinedo [Tue, 29 Mar 2016 19:46:12 +0000 (13:46 -0600)]
winrtinstaller: Add logging support to Windows Runtime Installer

8 years agolayers: Get rid of 1K limit on debug message length
Chris Forbes [Wed, 23 Mar 2016 23:06:35 +0000 (12:06 +1300)]
layers: Get rid of 1K limit on debug message length

Change-Id: I00246f3edd26078d634a8bd1f65755cafcc6467b

8 years agoloader: Fix MSVC post-build event so copy with non-existent dir works
Jon Ashburn [Mon, 28 Mar 2016 20:43:53 +0000 (14:43 -0600)]
loader: Fix MSVC post-build event so copy with non-existent dir works

Change-Id: I4629b36c1fbde76ba025fa38937dfcd22bbd9157

8 years agolayers: Clarify message when query has not been performed.
Michael Lentine [Fri, 25 Mar 2016 22:53:53 +0000 (17:53 -0500)]
layers: Clarify message when query has not been performed.

8 years agoRevert "layers: Make layout checks warnings for pass begin."
Michael Lentine [Fri, 25 Mar 2016 22:06:04 +0000 (17:06 -0500)]
Revert "layers: Make layout checks warnings for pass begin."

This reverts commit 851d28e4759f45bebd151fe163a50741a9947ff0.

8 years agolayers: update json to 1.0.7
Jon Ashburn [Mon, 28 Mar 2016 17:29:14 +0000 (11:29 -0600)]
layers: update json to 1.0.7

Change-Id: I19e6d2a0518f99161bfea0de94b267c5c56fd1ae

8 years agoheader: update to version 1.0.7
Jon Ashburn [Mon, 28 Mar 2016 15:59:08 +0000 (09:59 -0600)]
header: update to version 1.0.7

Change-Id: I11fcbd2746b2d54f2256539a99eac6fe97070118

8 years agoMerge pull request #201 from critsec/vkjson-build-fixes
Jesse Hall [Mon, 28 Mar 2016 15:35:28 +0000 (08:35 -0700)]
Merge pull request #201 from critsec/vkjson-build-fixes

vkjson: Fix include paths and clang errors

8 years agodemos: Change MSVC proj files to remove PATH and add VK_LAYER_PATH
Jon Ashburn [Mon, 28 Mar 2016 14:44:46 +0000 (08:44 -0600)]
demos: Change MSVC proj files to remove PATH  and add VK_LAYER_PATH

The PATH is lower in search order so ICD that install loader in System32
which is now happening no longer find the local built vulkan-1.dll via the
PATH setting. Add the VK_LAYER_PATH  so the local built layers get found.

Change-Id: I56097199a108e30fdf4787e09e62c8ca1544de91

8 years agocmake: Add post build event for MSVC for vulkan dll copy
Jon Ashburn [Fri, 25 Mar 2016 21:57:50 +0000 (15:57 -0600)]
cmake: Add post build event for MSVC for vulkan dll copy

This allows the demos and tests directories to find the locally
built vulkan-1.dll instead of that installed in the system32 directory.

Change-Id: I3177f4ba00d81addbd4df12e1d4f943d95824ff4

8 years agodemos: Fix 32-bit Windows compilation problem.
Karl Schultz [Fri, 25 Mar 2016 21:35:18 +0000 (15:35 -0600)]
demos: Fix 32-bit Windows compilation problem.

8 years agodemos: add missing signal.h to tri.
Karl Schultz [Fri, 25 Mar 2016 20:31:16 +0000 (14:31 -0600)]
demos: add missing signal.h to tri.

Change-Id: If1e509850506495126e827b8605e00fc3ef8c7f9

8 years agodemos: Implement --break for cube and tri.
Karl Schultz [Fri, 25 Mar 2016 20:25:16 +0000 (14:25 -0600)]
demos: Implement --break for cube and tri.

This argument makes the program stop in the debugger on a
validation error.  Only makes sense to use it with --validate.

8 years agolayers: DL - Get inheritedQueries support from physical device features
Tony Barbour [Fri, 25 Mar 2016 19:04:20 +0000 (13:04 -0600)]
layers: DL - Get inheritedQueries support from physical device features

Change-Id: I6f9c045d6154d2c08aa2516caf8e250dcef22e84

8 years agoloader: ghlvl#79, Fix to not report unsupported WSI surface extensions on Linux
Jon Ashburn [Fri, 25 Mar 2016 18:49:35 +0000 (12:49 -0600)]
loader: ghlvl#79, Fix to not report unsupported WSI surface extensions on Linux

Also fix issue where loader would advertise support for these extensions even if
the ICD or layers doesn't support it.  Now ICD must report surface extensions
for the loader to report them.  And on Linux if loader support for a given
surface extension (eg Mir) is compiled out then loader doesn't report it.

Change-Id: I51e302a32f5431f4893a3795ff31be60e9263f43

8 years agodemos: Simplify vulkaninfo to not enable any extensions.
Jon Ashburn [Fri, 25 Mar 2016 18:47:06 +0000 (12:47 -0600)]
demos: Simplify vulkaninfo to not enable any extensions.

For the Linux WSI surface extensions  where BOTH ICD and loader support is
needed for an extension to be supported there was an issue.  If ICD supported
extensions was not equal to loader supported extensions vulkaninfo would error
exit.

Change-Id: Ib6e07d92491b04b1fb90cbf1c6793ae766944d50

8 years agolayers: Use vector::resize instead of reserve to avoid portability issue.
Karl Schultz [Fri, 25 Mar 2016 19:21:25 +0000 (13:21 -0600)]
layers: Use vector::resize instead of reserve to avoid portability issue.

Fixes layer crash on Windows with cube --validate.  On Windows,
std::vector won't bump up the size of a vector (up to the reserved
amount) on an out_of_range access, while linux will.

8 years agolayers: Fix issue when sub-passes have diff attachment count.
Mark Young [Thu, 24 Mar 2016 16:14:35 +0000 (10:14 -0600)]
layers: Fix issue when sub-passes have diff attachment count.

In core_validation, if the attachment count between a primary
and secondary sub-pass was different, then it should treat
the shorter one as UNUSED.  So, if the longer one has the
attachment flags set to UNUSED, it shouldn't be an error.

Change-Id: I3647403551962ef522e7e2ba7ab10a5cb7466c52

8 years agoloader: Fix bugs found in code review.
Ian Elliott [Fri, 25 Mar 2016 15:54:04 +0000 (09:54 -0600)]
loader: Fix bugs found in code review.

8 years agocube: Call vkCreateInstance so that it sets up a temporary callback.
Ian Elliott [Fri, 25 Mar 2016 15:07:19 +0000 (09:07 -0600)]
cube: Call vkCreateInstance so that it sets up a temporary callback.

8 years agoloader: Setup temporary callback for vkDestroyInstance
Ian Elliott [Fri, 25 Mar 2016 14:43:01 +0000 (08:43 -0600)]
loader: Setup temporary callback for vkDestroyInstance

8 years agolayers: Replace ptr-to-ptr descriptor data struct with vector
Tobin Ehlis [Thu, 24 Mar 2016 16:16:09 +0000 (10:16 -0600)]
layers: Replace ptr-to-ptr descriptor data struct with vector

We were using GENERIC_HEADER** ppDescriptors to track updates to slots.
This was pretty messy so make it a bit cleaner with a vector instead.

8 years agolayers: Add check for renderArea being within framebuffer bounds.
Michael Lentine [Fri, 25 Mar 2016 01:48:59 +0000 (20:48 -0500)]
layers: Add check for renderArea being within framebuffer bounds.

8 years agolayers: LX453 fix typo in output message.
Karl Schultz [Fri, 25 Mar 2016 15:10:34 +0000 (09:10 -0600)]
layers: LX453 fix typo in output message.

Change-Id: I7ec8ba429a886bee14dd5a209fa6718941ec19d5

8 years agolayers: Make layout checks warnings for pass begin.
Michael Lentine [Fri, 25 Mar 2016 02:16:00 +0000 (21:16 -0500)]
layers: Make layout checks warnings for pass begin.

8 years agolayers: Update layout mismatch message to provide more detail.
Michael Lentine [Fri, 25 Mar 2016 02:36:53 +0000 (21:36 -0500)]
layers: Update layout mismatch message to provide more detail.

8 years agodemos: Unify cmd arg handling between cube and tri.
Karl Schultz [Fri, 25 Mar 2016 00:43:41 +0000 (18:43 -0600)]
demos: Unify cmd arg handling between cube and tri.

Add --c (frame count) handling to tri to improve testability and
to bring it up to par with cube.
Fix exit code return in both cube and tri for Windows.

Change-Id: I27516b9fc0d13f25f5511ab159a80159c2550237

8 years agoloader: Fix some typos from the recent WSI checkins: broke wayland
Jon Ashburn [Thu, 24 Mar 2016 23:26:59 +0000 (17:26 -0600)]
loader: Fix some typos from the recent WSI checkins: broke wayland

Change-Id: Ie25aaf462498eae7fcc31784015e22376e31a70a

8 years agoloader: Convert fprintf() calls to loader_log()
Ian Elliott [Thu, 24 Mar 2016 21:49:02 +0000 (15:49 -0600)]
loader: Convert fprintf() calls to loader_log()

8 years agolayers: WSI functions should not work unless enabled.
Ian Elliott [Thu, 24 Mar 2016 19:59:22 +0000 (13:59 -0600)]
layers: WSI functions should not work unless enabled.

The WSI extension functions are special.  They are statically exported from the
loader.  This means that an application can directly link against them, and not
have to call a vkGet*ProcAddr function.  However, the application is still
reponsible for for enabling the appropriate WSI extension.

An application was observed that called the WSI functions without enabling the
appropriate extensions.  It worked.  When that application was run with the
validation layers, it crashed.  A change was made to the layer to make sure
that an error was always logged.  It was decided that the loader should change
so that the terminator functions not work (and print a brief message) if an
application calls the function without enabling its extension.  This is done in
the terminator so that the validation layer can be called, which should log a
good error message; and yet still done here in case the application is never
tried with validation turned on.

8 years agoloader: ghlvl 116 Fix CreateDevice to use the proper ICDs PhysDev
Jon Ashburn [Thu, 24 Mar 2016 21:49:57 +0000 (15:49 -0600)]
loader: ghlvl 116 Fix CreateDevice to use the proper ICDs PhysDev

This is needed for querying extensoins from the ICD.

Change-Id: I5655d33d15bf0ea6de506f81821a30dd81ca3d5a

8 years agolayers: Migrate active_sets to active_slots
Tobin Ehlis [Thu, 24 Mar 2016 15:17:25 +0000 (09:17 -0600)]
layers: Migrate active_sets to active_slots

Previously for pipelines we were only tracking which sets were being used.
This change refined active_sets to active_slots. The slots include both the
set and the binding that are in use by the shader. This cleans up a couple
loops and prevents cases where we were checking inactive slots.

8 years agolayers: Fix layout transitions for combined aspect masks.
Michael Lentine [Thu, 24 Mar 2016 20:36:27 +0000 (15:36 -0500)]
layers: Fix layout transitions for combined aspect masks.

8 years agoandroid: Re-enable layer validation tests using shaderc and vulkan_wrapper
Cody Northrop [Wed, 9 Mar 2016 05:25:52 +0000 (22:25 -0700)]
android: Re-enable layer validation tests using shaderc and vulkan_wrapper

8 years agolayers: Additional mutex fixes
Mark Lobodzinski [Thu, 24 Mar 2016 19:38:40 +0000 (13:38 -0600)]
layers: Additional mutex fixes

Change-Id: I0b1678a97f962ec30903c9076f08668ec89fc981

8 years agolayers: GH177 Fix deadlocks
Tobin Ehlis [Thu, 24 Mar 2016 18:50:14 +0000 (12:50 -0600)]
layers: GH177 Fix deadlocks

Fix some early return cases where lock wasn't correctly released.

8 years agolayers: fix bad api version
Jon Ashburn [Thu, 24 Mar 2016 14:32:09 +0000 (08:32 -0600)]
layers: fix bad api version

Change-Id: I664a773b7e8dfd7453754227f6a424311c4aa734

8 years agoGH171: Use relative path for building Android bits
Courtney Goeltzenleuchter [Tue, 22 Mar 2016 16:58:40 +0000 (10:58 -0600)]
GH171: Use relative path for building Android bits

8 years agoGH171: Fix compiler warning
Courtney Goeltzenleuchter [Tue, 22 Mar 2016 22:31:34 +0000 (16:31 -0600)]
GH171: Fix compiler warning

8 years agoGH171: Fix for NDK packaging
Courtney Goeltzenleuchter [Tue, 22 Mar 2016 22:27:25 +0000 (16:27 -0600)]
GH171: Fix for NDK packaging

Script depends on current working directory to
be this same as where the script lives so make
sure that's the case.
Return 0 so NDK tools know things were successful.

8 years agolayers: remove weird double assignment to pAttachments
Chris Forbes [Wed, 23 Mar 2016 22:42:09 +0000 (11:42 +1300)]
layers: remove weird double assignment to pAttachments

8 years agolayers: LX450, Tighten up queueFamilyIndex validation, fix crash
Mark Lobodzinski [Tue, 22 Mar 2016 16:07:26 +0000 (10:07 -0600)]
layers: LX450, Tighten up queueFamilyIndex validation, fix crash

For CreateBuffer and CreateImage the QFIs should be ignored unless
sharingMode is set to CONCURRENT.  Also added QFI validation to
CreateCommandPool and added a special case for when an index is
incorrectly set to QUEUE_FAMILY_IGNORED.

Change-Id: I17639230ea7aa58ab89b9b0dc33e55927e9f1c84

8 years agolayers: Merge renderpass maps in core_validation
Tobin Ehlis [Tue, 22 Mar 2016 19:50:21 +0000 (13:50 -0600)]
layers: Merge renderpass maps in core_validation

Kill passMap, merge all renderpass data into RENDER_PASS_NODE and only use renderPassMap.

8 years agolayers: Merge framebuffer maps in core_validation
Tobin Ehlis [Tue, 22 Mar 2016 19:38:08 +0000 (13:38 -0600)]
layers: Merge framebuffer maps in core_validation

Add attachments container to FRAMEBUFFER_NODE and only use frameBufferMap.

8 years agolayers: LX448, Prevent descriptorSetCount overflow in core_validation
Mark Lobodzinski [Mon, 21 Mar 2016 22:32:53 +0000 (16:32 -0600)]
layers: LX448, Prevent descriptorSetCount overflow in core_validation

Tracking descriptor and descriptorSet counts was incorrect, sometimes causing
integer overflow and application crashes for large createInfo values.

Change-Id: I92196659d6a7476582aa069e42c9a0d7228ba087

8 years agolayers: Fix AV in core_validaton
Mark Lobodzinski [Wed, 23 Mar 2016 20:34:52 +0000 (14:34 -0600)]
layers: Fix AV in core_validaton

Caused crashes in DOTA2

Change-Id: I74d121641872597a63ea42e13ff860112fc7c314

8 years agolayers: Fix up MTMERGE in CV layer to allow disabling mem_tracker validation
Mark Lobodzinski [Wed, 23 Mar 2016 20:33:02 +0000 (14:33 -0600)]
layers: Fix up MTMERGE in CV layer to allow disabling mem_tracker validation

Need this for debugging, it now works again. Renamed .cpp defines to
MTMERGESOURCE to prevent header file conflicts.

Change-Id: Ie144be32dedf8e9b370437583af60413043865ef

8 years agolayers: GH117: Change warning to an error.
Ian Elliott [Wed, 23 Mar 2016 17:13:09 +0000 (11:13 -0600)]
layers: GH117: Change warning to an error.

8 years agolayers: GH117: swapchain layer warns if app uses neither semaphore nor fence.
Ian Elliott [Wed, 23 Mar 2016 14:28:54 +0000 (08:28 -0600)]
layers: GH117: swapchain layer warns if app uses neither semaphore nor fence.

This addresses github issue #117.  Applications should call
vkAcquireNextImageKHR with either a valid semaphore and/or fence.  Issue a
warning if both are set to VK_NULL_HANDLE.

8 years agodemos: cube exit status reflects validation status
Karl Schultz [Tue, 22 Mar 2016 23:06:13 +0000 (17:06 -0600)]
demos: cube exit status reflects validation status

Normal exit code is 0, but exit with code 1 if validation fails.

Change-Id: Ic8bb960b09e1b9f3274188eb4a30151ae6f3d0a0

8 years agowinrtinstaller: sign Config powershell script
David Pinedo [Tue, 22 Mar 2016 20:33:50 +0000 (14:33 -0600)]
winrtinstaller: sign Config powershell script

8 years agotests: Use header macro for API version rather than make_version
Jon Ashburn [Tue, 22 Mar 2016 19:57:46 +0000 (13:57 -0600)]
tests: Use header macro for API version rather than make_version

Change-Id: I454b5d2c4deea46712dff9d5c2af72af683f05a3

8 years agomisc: Update to header version 1.0.6
Jon Ashburn [Tue, 22 Mar 2016 18:57:13 +0000 (12:57 -0600)]
misc: Update to header version 1.0.6

Change-Id: Idf7a9d40278b796e16effa54e9b60668d275b8ec

8 years agoRemove device from layer_data_map at destroy in parameter_validation
Tony Barbour [Tue, 22 Mar 2016 19:23:24 +0000 (13:23 -0600)]
Remove device from layer_data_map at destroy in parameter_validation

Change-Id: Ife2286cc807288c9900b084f5f7c5a09d830f87a

8 years agolayers: Update event tracking to account for sequential cross command buffer and...
Michael Lentine [Fri, 18 Mar 2016 19:11:44 +0000 (14:11 -0500)]
layers: Update event tracking to account for sequential cross command buffer and queue tracking.

8 years agolayers: Merge of cmd buffer maps in core_validation
Tobin Ehlis [Mon, 21 Mar 2016 20:14:44 +0000 (14:14 -0600)]
layers: Merge of cmd buffer maps in core_validation

This is the first step in killing cbMap from mem_tracker and merging
all cmd buffer tracking into commandBufferMap.
This removes all cbMap references, merges some data between the two maps
as appropriate, and replicates some of the mem_tracker data into the
GLOBAL_CB_NODE struct.
There is still some work to be done here in order to remove some of
the replicated data and improve some algorithms that use the
commandBufferMap to avoid duplicate efforts.

8 years agobuild: Cleanup build_windows_targets.bat
Karl Schultz [Tue, 22 Mar 2016 18:05:31 +0000 (12:05 -0600)]
build: Cleanup build_windows_targets.bat

- This batch file can be run in any of the three repos,
  Vulkan-LoaderAndValidationLayers, VulkanTools, and VulkanSamples,
  so remove comments suggesting otherwise.
- Replace spot-check for an artifact with checking errorlevel
  from msbuild to discover build failures.

8 years agolayers: Fix message for array layers to say array layers.
Michael Lentine [Mon, 21 Mar 2016 15:01:33 +0000 (10:01 -0500)]
layers: Fix message for array layers to say array layers.

8 years agolayers: tidy up PIPELINE_NODE a bit
Chris Forbes [Thu, 17 Mar 2016 22:07:59 +0000 (11:07 +1300)]
layers: tidy up PIPELINE_NODE a bit

V2: Incorporate review feedback
V3: Squash warning from printf(size_t).

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Slightly simplify descriptor uses loop in SC
Chris Forbes [Thu, 17 Mar 2016 22:07:35 +0000 (11:07 +1300)]
layers: Slightly simplify descriptor uses loop in SC

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: GH157 Update error messages to be consistent
Tobin Ehlis [Mon, 21 Mar 2016 13:39:14 +0000 (07:39 -0600)]
layers: GH157 Update error messages to be consistent

Print dynamic offset in error messages as hex to be consistent.
Also fix typos of offet->offset

8 years agolayers: Add lock around erase from frameBufferMap in core_validation
Tony Barbour [Mon, 21 Mar 2016 23:18:07 +0000 (17:18 -0600)]
layers: Add lock around erase from frameBufferMap in core_validation

Change-Id: I042573b54876e63c19140948a26d388934e1a3c9

8 years agolayers: Fix core_validation layer cube --validate failure
Mark Lobodzinski [Mon, 21 Mar 2016 22:31:54 +0000 (16:31 -0600)]
layers: Fix core_validation layer cube --validate failure

Change-Id: Ice327b98f0befa0a605155b5ebe3dfe359db6020

8 years agolayers: GH156 (bug-155): Check for WSI enables
Courtney Goeltzenleuchter [Sat, 19 Mar 2016 16:38:52 +0000 (10:38 -0600)]
layers: GH156 (bug-155): Check for WSI enables

https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/155

8 years agolayers: Fix windows issue in smoketest --validate
Mark Lobodzinski [Mon, 21 Mar 2016 19:44:24 +0000 (13:44 -0600)]
layers: Fix windows issue in smoketest --validate

Change-Id: I50a7d39fcd4b6a9c895cfafd2405058e411220f4

8 years agolayers: Rename param_checker to parameter_validation
Mark Lobodzinski [Thu, 17 Mar 2016 21:08:18 +0000 (15:08 -0600)]
layers: Rename param_checker to parameter_validation

Also, param_check.h -> parameter_validation.h and .json files changed.

Change-Id: I9db10563bcc2640fe6b90588d3c80c4fe50a8a83

8 years agoRemove faulty LineLength .clang-format directive.
Karl Schultz [Mon, 21 Mar 2016 16:59:53 +0000 (10:59 -0600)]
Remove faulty LineLength .clang-format directive.

The LineLength: 132 directive was making some clang-format
implementations stop working.  The correct directive is
ColumnLimit.

We also had agreed that the ColumnLimit would be 80 for
all code in this repo except for layers. So remove the
directive here to keep 80 as the default and to reflect
current formatting.

The layers folder has a .clang-format file that correctly
specifies ColumnLimit: 132.

Change-Id: Ic7c2a575e7d52141e3ecbc2e3644210cd85e5ac9

8 years agolayers: Hold shader_module by unique_ptr, clean up properly
Chris Forbes [Fri, 18 Mar 2016 03:30:03 +0000 (16:30 +1300)]
layers: Hold shader_module by unique_ptr, clean up properly

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: More housekeeping: slightly lighten descriptor set compatibility
Chris Forbes [Fri, 18 Mar 2016 02:49:58 +0000 (15:49 +1300)]
layers: More housekeeping: slightly lighten descriptor set compatibility

8 years agolayers: More housekeeping: use stringstreams for describe_type
Chris Forbes [Fri, 18 Mar 2016 01:59:39 +0000 (14:59 +1300)]
layers: More housekeeping: use stringstreams for describe_type

8 years agolayers: Determine required descriptor count when stripping array levels
Chris Forbes [Thu, 17 Mar 2016 22:26:06 +0000 (11:26 +1300)]
layers: Determine required descriptor count when stripping array levels

8 years agolayers: Add check for descriptor count
Chris Forbes [Thu, 17 Mar 2016 22:21:35 +0000 (11:21 +1300)]
layers: Add check for descriptor count

We're not really determining how many descriptors the binding needs yet,
so this only catches the descriptorCount==0 case.

8 years agolayers: Just return the whole binding struct from has_descriptor_binding
Chris Forbes [Thu, 17 Mar 2016 22:14:27 +0000 (11:14 +1300)]
layers: Just return the whole binding struct from has_descriptor_binding

We're about to want the descriptorCount too. This was getting absurd.

8 years agoAllow REMAINING for subresources.
Michael Lentine [Fri, 18 Mar 2016 19:49:09 +0000 (14:49 -0500)]
Allow REMAINING for subresources.

8 years agolayers: Track lifetime when using cross-queue semaphores.
Michael Lentine [Thu, 17 Mar 2016 21:34:32 +0000 (16:34 -0500)]
layers: Track lifetime when using cross-queue semaphores.

8 years agowinrtinstaller: Set up proper Access Control for install/temp dirs and files
David Pinedo [Fri, 18 Mar 2016 19:15:27 +0000 (13:15 -0600)]
winrtinstaller: Set up proper Access Control for install/temp dirs and files

This change addresses:
   https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/70

Also made a change to not require a reboot on uninstall if the install dir
is not empty.  This partially addresses:
   https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/70
(A similar change needs to be made to the SDK installer.)

8 years agolayers: Additional null checks for param_checker
Dustin Graves [Thu, 17 Mar 2016 17:04:45 +0000 (11:04 -0600)]
layers: Additional null checks for param_checker

- Add null checks to validation code that dereferences potentially
  null pointers.
- Add asserts to functions that expect certain pointers to never
  be null.

Change-Id: I041b641289c9681ff9177bcec998fc95f6416985

8 years agolayers: Lock around changes to imageMap in image layer
Tony Barbour [Thu, 17 Mar 2016 16:24:10 +0000 (10:24 -0600)]
layers: Lock around changes to imageMap in image layer

Change-Id: I75382973eacf80e3ee84fb390c79bc7c19cc14d7

8 years agolayers: Lock around destroyedFramebuffers inserts in core_validation
Tony Barbour [Thu, 17 Mar 2016 20:50:55 +0000 (14:50 -0600)]
layers: Lock around destroyedFramebuffers inserts in core_validation

Change-Id: I32754ae405c01acbde8a82ebaef0938a5e314f73

8 years agolayers: Fix 'Debug Report callbacks not removed' error messages
Mark Lobodzinski [Thu, 17 Mar 2016 19:59:51 +0000 (13:59 -0600)]
layers: Fix 'Debug Report callbacks not removed' error messages

Change-Id: If214e07ab7fd8e50af0528c36595bf92716357f3

8 years agolayers: Fix validation of vkCmdBindDescriptorSets() during renderpass
Tobin Ehlis [Thu, 17 Mar 2016 19:37:40 +0000 (13:37 -0600)]
layers: Fix validation of vkCmdBindDescriptorSets() during renderpass

Spec allows vkCmdBindDescriptorSets() to be called inside or outside of a
renderpass so killing two core_validation checks that violate this behavior.

8 years agolayers: Consolidate VkDeviceMemory maps into a single map
Tobin Ehlis [Wed, 16 Mar 2016 22:00:36 +0000 (16:00 -0600)]
layers: Consolidate VkDeviceMemory maps into a single map

There were three separate maps in core_validation.cpp that used VkDeviceMemory for key.
This change consolidates those maps into a single map with DEVICE_MEM_INFO as the value.
To accomadate this I added data to DEVICE_MEM_INFO struct to track mapped image/buffer
ranges as well as image reference for memory with mapped image.

8 years agolayers: Consolidate properties checks in core_validation
Tobin Ehlis [Wed, 16 Mar 2016 20:20:54 +0000 (14:20 -0600)]
layers: Consolidate properties checks in core_validation

Remove global properties and only use properties from physDevProperties.properties.

8 years agolayers: Remove global wsi_enabled in core_validation
Tobin Ehlis [Wed, 16 Mar 2016 20:12:47 +0000 (14:12 -0600)]
layers: Remove global wsi_enabled in core_validation

core_validation layer only needs wsi_enabled bool from devExts struct.

8 years agolayers: Lock around image and buffer range erases in core validation
Tony Barbour [Thu, 17 Mar 2016 17:18:47 +0000 (11:18 -0600)]
layers: Lock around image and buffer range erases in core validation

Change-Id: Id975474ef331369e5dc57a24ea6051253fb657cf

8 years agolayers: Consolidate swapchainMaps in core_validation
Tobin Ehlis [Wed, 16 Mar 2016 19:52:20 +0000 (13:52 -0600)]
layers: Consolidate swapchainMaps in core_validation

Remove old mem_tracker swapchainMap and consolidate all swapchain tracking
into the devExts struct swapchainMap.

8 years agoandroid: Fix android build
Tobin Ehlis [Thu, 17 Mar 2016 12:48:27 +0000 (06:48 -0600)]
android: Fix android build

layer_utils needs vk_loader_platform.h

8 years agolayers: validate capabilities against device features
Chris Forbes [Mon, 14 Mar 2016 21:12:48 +0000 (10:12 +1300)]
layers: validate capabilities against device features

V2: squashed in feedback.
V3: More careful about VkBool32

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Fix layer debug action initialization
Dustin Graves [Thu, 17 Mar 2016 00:43:34 +0000 (18:43 -0600)]
layers: Fix layer debug action initialization

Fix for debug_action option retrieval.

Change-Id: Icd601b337b40830d2f2231cdb0ec22469b5e8ec5

8 years agolayers: Update validation layer details doc for layer renaming
Mark Lobodzinski [Wed, 16 Mar 2016 23:09:02 +0000 (17:09 -0600)]
layers: Update validation layer details doc for layer renaming

Delete mem_tracker
Delete draw_state
Add    core_validation

Change-Id: Idc84160b94febf5c4d81ea0c6f34b9f51592e472

8 years agolayers: Move lock around add_object_create_info in core_validation
Tony Barbour [Wed, 16 Mar 2016 23:07:04 +0000 (17:07 -0600)]
layers: Move lock around add_object_create_info in core_validation

Change-Id: I9b183e1231fecc7dce8db9899ee115c5e7a2be3e

8 years agolayers: Move layer debug action initialization into layer_utils
Mark Lobodzinski [Tue, 15 Mar 2016 20:21:59 +0000 (14:21 -0600)]
layers: Move layer debug action initialization into layer_utils

Also removed dead code from the layer generation script.

Change-Id: I64fdcaaf1aed8152de62079568c8e247333d8c61

8 years agowinrtinstaller: Allow layers from SDK older than RT to be configured for use
David Pinedo [Wed, 16 Mar 2016 20:41:56 +0000 (14:41 -0600)]
winrtinstaller: Allow layers from SDK older than RT to be configured for use

Layers from SDK can be used by an RT if their major, minor, and patch numbers
are the same.

For example, if SDK 1.0.5.0 is already installed, and then RT 1.0.5.1 is
installed. During the RT installation, the layer registry entries will be set
to point to the layers in SDK 1.0.5.0.

8 years agolayers: Update doc validation to use core_validation filenames
Tobin Ehlis [Wed, 16 Mar 2016 17:06:44 +0000 (11:06 -0600)]
layers: Update doc validation to use core_validation filenames

8 years agodemos: Put smoketest exe in same dir as cube and tri
Tony Barbour [Tue, 15 Mar 2016 22:24:46 +0000 (16:24 -0600)]
demos: Put smoketest exe in same dir as cube and tri

Change-Id: I35dec36d3e67912375180192e1ca8ed1fa2abe75

8 years agolayers: Replace draw_state and mem_tracker with core validation
Mark Lobodzinski [Tue, 15 Mar 2016 23:23:12 +0000 (17:23 -0600)]
layers: Replace draw_state and mem_tracker with core validation

Change-Id: Ib8eb7491f6c60bc6d05da64a2311c8cfa5f88d60

8 years agocmake: Find spirv/glslang dependencies
Dustin Graves [Tue, 15 Mar 2016 21:39:08 +0000 (15:39 -0600)]
cmake: Find spirv/glslang dependencies

Replace the hardcoded glslang and spirv-tools path with
CMake find macros to find the include, library, and programs.

Change-Id: Id498ad75d663f2795207b39b40a11ddfe2c03920

8 years agowinrtinstaller: Install both x86 and x64 redist's if either is not installed
David Pinedo [Tue, 15 Mar 2016 22:42:14 +0000 (16:42 -0600)]
winrtinstaller: Install both x86 and x64 redist's if either is not installed

Fix for issue:
  https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/109

8 years agolayers: Add some defensive code to core_validation
Tobin Ehlis [Tue, 15 Mar 2016 21:52:11 +0000 (15:52 -0600)]
layers: Add some defensive code to core_validation

Missed a NULL check and assert when I merged in the bindingToIndexMap fix for descriptor type/stageFlags.

8 years agocmake: Fix windows debug build for large object files
Mark Lobodzinski [Tue, 15 Mar 2016 16:31:44 +0000 (10:31 -0600)]
cmake: Fix windows debug build for large object files

The core_validation layer is presently large.

Change-Id: Id1ab0dd0af0a3bc18078bdd50bf42add46d77339