platform/upstream/Vulkan-LoaderAndValidationLayers.git
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 agotests: fix spelling mistakes
Eric Engestrom [Sat, 2 Apr 2016 21:08:10 +0000 (22:08 +0100)]
tests: 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 agotests: Update validation layer tests for CopyImage validation additions
Mark Lobodzinski [Thu, 31 Mar 2016 16:45:56 +0000 (10:45 -0600)]
tests: Update validation layer tests for CopyImage validation additions

Change-Id: I5d568e92968cf4ef0a0813cba5f174b874b691d5

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

8 years agotests: Fix ImageAspectMask usage for vk_blit_tests operation.
Karl Schultz [Tue, 29 Mar 2016 18:41:24 +0000 (12:41 -0600)]
tests: Fix ImageAspectMask usage for vk_blit_tests operation.

Remove code that forced a single bit in the image aspect masks
which allows tests to work correctly on devices that use
24/8 depth/stencil buffers.
Add checks for proper usage according to spec.

Change-Id: Ie0a5d70c4d5e286f96c2e4376f46ea66a6d82656

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 agovkjson: Fix include paths and clang errors
Jesse Hall [Sat, 26 Mar 2016 21:30:55 +0000 (14:30 -0700)]
vkjson: Fix include paths and clang errors

Fixes issues discovered when trying to build vkjson as part of the
Android platform build system and a Clang 3.8-based compiler.

(a) Vulkan includes should be "<vulkan/...>".

(b) Clang issues a "missing field initializer" warning for "= {0}"
    in C++. This is arguably incorrect, but "= {}" is defined to
    recursively zero-initialize primitive types, so just use that.

(c) Clang correctly issues an error when a template parameter default
    value is redefined.

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