platform/upstream/Vulkan-Tools.git
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

8 years agolayers: Fix crash in core_validation layer
Mark Lobodzinski [Tue, 15 Mar 2016 15:49:03 +0000 (09:49 -0600)]
layers: Fix crash in core_validation layer

CommandBuffers were getting added to commandPoolMap twice.

Change-Id: I115757751ef0aebb1f2599217b3117beca3cd0b7

8 years agolayers: Add json files for core_validation layer
Mark Lobodzinski [Tue, 15 Mar 2016 15:33:14 +0000 (09:33 -0600)]
layers: Add json files for core_validation layer

Change-Id: I69495151be84fa18feb5a55848eb536ac9e73100

8 years agolayers: Fix core_validation compilation error
Mark Lobodzinski [Tue, 15 Mar 2016 15:19:59 +0000 (09:19 -0600)]
layers: Fix core_validation compilation error

Change-Id: I1ed4fffbf607465239afbce4d7d28b11bceaa548

8 years agolayers: Merge mem_tracker and draw_state layers into core_validation layer
Tobin Ehlis [Wed, 9 Mar 2016 23:12:48 +0000 (16:12 -0700)]
layers:  Merge mem_tracker and draw_state layers into core_validation layer

cube & tri --validate now use core_validation instead of MT & DS

Very little efficiency has been pulled out for this initial merge.
A few maps have been merged, but otherwise almost all of the mem_tracker
code is pulled intact and surrounded in "#if MTMERGE" blocks.

Change-Id: Icf060bfc0177fc8c9fa7d8d57f7ddc446357b665

8 years agolayers: GH130 Fix to correctly get type/flags from set binding
Tobin Ehlis [Tue, 15 Mar 2016 13:59:11 +0000 (07:59 -0600)]
layers: GH130 Fix to correctly get type/flags from set binding

We were using bindingToIndexMap to do look-ups into type and stage vectors which is incorrect.
bindingToIndexMap is to index into the original pBindings map that was passed in when the
layout was created. This fix does this to correctly pull type and stage of a binding in draw_state.

8 years agowinrtinstaller: Verify vulkan-1-*dll has correct file name format
David Pinedo [Tue, 15 Mar 2016 17:07:19 +0000 (11:07 -0600)]
winrtinstaller: Verify vulkan-1-*dll has correct file name format

8 years agolayers: PR118, Remove erroneous validation error from swapchain
szdarkhack [Sat, 12 Mar 2016 16:41:19 +0000 (18:41 +0200)]
layers: PR118, Remove erroneous validation error from swapchain

Remove error when selecting VK_PRESENT_MODE_FIFO_KHR (required to be supported)
without enumerating the supported presentation modes first.

Change-Id: Iacc8fa55dec1b1f72011041813b423f95912a092

8 years agolayers: GH132 Event handle should be printed as a hexadecimal value
Dominik Witczak [Tue, 15 Mar 2016 10:48:25 +0000 (11:48 +0100)]
layers: GH132 Event handle should be printed as a hexadecimal value

8 years agoandroid: Fix android build
Tobin Ehlis [Tue, 15 Mar 2016 13:40:49 +0000 (07:40 -0600)]
android: Fix android build

Account for update of draw_state to include SPIRV/spirv.hpp.

8 years agolayers: draw state image/layout cleanup
Dustin Graves [Fri, 11 Mar 2016 23:06:39 +0000 (16:06 -0700)]
layers: draw state image/layout cleanup

Remove tracked device memory, subresource, and layout data associated
with an image when that image is destroyed.  Eliminates spurious
draw state messages that report invalid layout issues when the
destroyed image's handle is recylced and the new image state is
validated with the old image's data.

Change-Id: Ia956a3f7c60a34e6357f4d0d4d9dfe760910e97c

8 years agolayers: Change header path for spirv.h in draw_state
Jon Ashburn [Mon, 14 Mar 2016 20:28:12 +0000 (14:28 -0600)]
layers: Change header path for spirv.h in draw_state

Change-Id: I8d2739daa17fc6b971e9e093158b22b211920558

8 years ago#include formatting changes for relative look-up.
Aaron Karp [Sun, 13 Mar 2016 20:41:59 +0000 (16:41 -0400)]
#include formatting changes for relative look-up.

- <> notation skips relative path searching in Visual Studio with some settings (and per language spec if I'm not mistaken).  Switched to "" notation for includes where relative look-up seemed to be the intention.

8 years agodemos: Fix typo in tri.c that prevented validate arg from working correctly
Mark Lobodzinski [Mon, 14 Mar 2016 14:26:01 +0000 (08:26 -0600)]
demos: Fix typo in tri.c that prevented validate arg from working correctly

Change-Id: I8562e601c27e2413071f47ed97fe5ffd9f46bd07

8 years agolayers: Add pNext parameter checking
Dustin Graves [Wed, 9 Mar 2016 00:48:20 +0000 (17:48 -0700)]
layers: Add pNext parameter checking

Validate pNext based on the validextensionstructs tag from the XML
registry.  If the tag provides a list of valid structures, walk the
pNext list and check each node's sType value agains the
VkStructureType value associated with the structs from the list.
If no valid structure list is provided, ensure that pNext is NULL.

Invalid struct types produce errors similar to the following:
ERROR: [PARAMCHECK] Code 1 : vkCreateImage: pCreateInfo->pNext chain
 includes a structure with unexpected VkStructureType
 VK_STRUCTURE_TYPE_APPLICATION_INFO; Allowed structures are
 [VkInstanceCreateInfo, VkDeviceCreateInfo]

Change-Id: I2c2471a068cb304120c66cb4156331999f8548cd

8 years agoloader: make sure createDevice uses ICDs physicalDevice
Jon Ashburn [Fri, 11 Mar 2016 21:43:57 +0000 (14:43 -0700)]
loader: make sure createDevice uses ICDs physicalDevice

Trampoline CreateDevice was using the terminator's physicalDevice instead of
the ICDs.

Change-Id: Ifdc6497fe4130e1ac1440b225401e65600b2a999

8 years agospirv: Pick up SPIRV-Tools fix for version generation script.
Karl Schultz [Fri, 11 Mar 2016 20:17:40 +0000 (13:17 -0700)]
spirv: Pick up SPIRV-Tools fix for version generation script.

This bug would only occur when building spirv-tools outside
of a git repo, such as inside of an SDK install.  When
outside of a git repo, the version generation script
would hit a corner case, making the python script fail.

Change-Id: I5c3a8ce35e8379396e8d19281bbe3331a3f75820

8 years agoloader: Fix cmake on win for list of normal and opt sources
Jon Ashburn [Fri, 11 Mar 2016 17:58:56 +0000 (10:58 -0700)]
loader: Fix cmake on win for list of normal and opt sources

Change-Id: I5eb7836ba0606628fc663ecfa8cd3ca4d535a8b9

8 years agolayers: GH67: Add missing mem_tracker interception for vkCmdBlitImage() calls
Dominik Witczak [Fri, 11 Mar 2016 09:32:34 +0000 (10:32 +0100)]
layers: GH67: Add missing mem_tracker interception for vkCmdBlitImage() calls

Change-Id: I5d683323f6d038907ecb82e62c418e00aeaa5315

8 years agolayers: Fix overlapping attachment aliasing dependency check in draw_state
Michael Lentine [Thu, 10 Mar 2016 20:36:28 +0000 (14:36 -0600)]
layers: Fix overlapping attachment aliasing dependency check in draw_state

Change-Id: I3707afae288ed8edb644d68a6cacc9781ed11558

8 years agolayers: Enfoce that unique objects if enabled happens before draw_state in the chain.
Michael Lentine [Fri, 4 Mar 2016 17:16:30 +0000 (11:16 -0600)]
layers: Enfoce that unique objects if enabled happens before draw_state in the chain.

8 years agolayers: Fix draw_state handling of special image layouts in CmdPipelineBarrier
Mark Lobodzinski [Wed, 9 Mar 2016 22:42:55 +0000 (15:42 -0700)]
layers: Fix draw_state handling of special image layouts in CmdPipelineBarrier

Layer was ignoring VK_REMAINING_MIP_LEVELS and *ARRAY_LAYERS, resulting in
Source2 applications hanging.

Change-Id: I2ebecd3120eec9a97b6f3672984c15bd2e438c5c

8 years agoloader: fix cmake file so it doesn't always build loader with DEBUG
David Pinedo [Thu, 10 Mar 2016 23:50:50 +0000 (16:50 -0700)]
loader: fix cmake file so it doesn't always build loader with DEBUG

8 years agolayers: Fix helper script to not dereference strings with a NULL pointer.
Jon Ashburn [Thu, 10 Mar 2016 21:21:09 +0000 (14:21 -0700)]
layers: Fix helper script to not dereference strings with a NULL pointer.

Fixes the string helper functions.

Change-Id: I4177e498b734af9188088188a16a09aa2a6113b3

8 years agolayers: Update layer validation details document
Mark Lobodzinski [Thu, 10 Mar 2016 16:53:53 +0000 (09:53 -0700)]
layers: Update layer validation details document

Change-Id: I4990f7882061ce36f4520ce20655b0ceb06ba168

8 years agolayers: GH99 Track all command buffers submitted at once at the same time.
Michael Lentine [Thu, 10 Mar 2016 18:08:30 +0000 (12:08 -0600)]
layers: GH99 Track all command buffers submitted at once at the same time.

8 years agolayers: GH96 Fix error messages for bad layout
Tobin Ehlis [Thu, 10 Mar 2016 15:53:58 +0000 (08:53 -0700)]
layers: GH96 Fix error messages for bad layout

Instead of printing attachements as #s in the error messages, print the layout string.

8 years agolayers: GH98 Only check fence in-use once per QueueSubmit
Tobin Ehlis [Thu, 10 Mar 2016 16:18:20 +0000 (09:18 -0700)]
layers: GH98 Only check fence in-use once per QueueSubmit

In vkQueueSubmit, perform the fence in-use check first.
Then validate each submit, which includes marking the current fence in-use.

8 years agodocs: Update README.md
Jon Ashburn [Thu, 10 Mar 2016 16:05:27 +0000 (09:05 -0700)]
docs: Update README.md

Change-Id: Idba8b7e07d3a71e49c01e406825b96ccbb342efa

8 years agoUpdate BUILD.md
Karl Schultz [Thu, 10 Mar 2016 16:13:00 +0000 (09:13 -0700)]
Update BUILD.md

Update for upcoming SDK release.
Reword to make it less necessary to change this file for future SDK releases.