platform/upstream/Vulkan-LoaderAndValidationLayers.git
7 years agoglslang/spirv: Update repo revisions
Mark Young [Fri, 26 Aug 2016 15:04:24 +0000 (09:04 -0600)]
glslang/spirv: Update repo revisions

Update the SPIR-V Tools, SPIR-V Headers, and Glslang revisions
for the upcoming SDK.

Change-Id: I12d57d75691d1a0e40efd986247ecdb58bf0bf61

7 years agoglslang: Remove change to revert texel fetch fix.
Mark Young [Fri, 26 Aug 2016 02:12:05 +0000 (20:12 -0600)]
glslang: Remove change to revert texel fetch fix.

Previously, we had to revert a texel fetch fix in glslang as
part of the update_external_sources.bat/sh due to a bug in the
certain drivers.  The drivers have been fixed and released so
we can remove the change.

Change-Id: I018a0dbbc5fb27d7fbd91bc3073f0f5bef5cd346

7 years agolayers: return collect_* result containers rather than using & out
Chris Forbes [Tue, 23 Aug 2016 01:04:34 +0000 (13:04 +1200)]
layers: return collect_* result containers rather than using & out

This is clearer at the call site, should be no slower in C++11+, and
complies with the style guide.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agodemos: Restore Wayland compile behavior in cube
Tony Barbour [Thu, 25 Aug 2016 19:14:45 +0000 (13:14 -0600)]
demos: Restore Wayland compile behavior in cube

And document supported configurations

Change-Id: Ib6cdccf48c75373acfc2ebe625719360caa16657

7 years agodemos: GH862 Fix build errors of demos (cube, vulkaninfo) on the wayland only window...
Mun Gwan-gyeong [Sat, 20 Aug 2016 05:46:22 +0000 (14:46 +0900)]
demos: GH862 Fix build errors of demos (cube, vulkaninfo) on the wayland only window system

Change-Id: I76a36e3aad059356bcb69455702ade1cfec8b924
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
7 years agolayers: GH849: Defend against poorly-written applications
Ian Elliott [Wed, 24 Aug 2016 17:30:45 +0000 (11:30 -0600)]
layers: GH849: Defend against poorly-written applications

A test application was written that didn't properly call some count-based query
commands.  In this particular case, they always hard-coded the count variable
to 1 the 2nd time the query was called.  The swapchain layer was only recording
the 1st count value in this case, and this caused a seg fault when the
vkCreateSwapchainKHR command validation code was run.

This commit better defends against such poorly-written applications, so that
the vkCreateSwapchainKHR command validation code won't seg fault.  This
includes looking for VK_INCOMPLETE as a successful return code from the ICD.

7 years agolayers: Fix paramter_validation array name codegen
Dustin Graves [Fri, 22 Jul 2016 19:20:44 +0000 (13:20 -0600)]
layers: Fix paramter_validation array name codegen

Replace std::string with ParameterName for the generated
parameter_validation layer code so that the parameter names
printed by the generated code contain the correct array
subscript values.  Also updates the parameter_validation
tests to reflect the change to the printed names.

Issues-Addressed: GitHub #462
Change-Id: I3032e08052fc003ba066bbe613e5faf3ed049964

7 years agolayers: Fix parameter_validation array name format
Dustin Graves [Fri, 22 Jul 2016 19:19:46 +0000 (13:19 -0600)]
layers: Fix parameter_validation array name format

Replace std::string with ParameterName for the parameter_validation
utility functions so that the parameter names printed by these
functions contain the correct array subscript values.

Issues-Addressed: GitHub #462
Change-Id: I09fc6a45e8e41ba28ef7d8fc44ce9e8874feefad

7 years agolayers: Add parameter name formatting class
Dustin Graves [Fri, 22 Jul 2016 19:19:02 +0000 (13:19 -0600)]
layers: Add parameter name formatting class

Add a custom parameter name class with support for deferred
formatting of names containing array subscripts.  The class
stores a format string and a vector of index values, and
performs string formatting when an accessor function is called
to retrieve the name string.

Change-Id: I941116a16b6fa19e63314cbeab33223e0fa072d3

7 years agoloader: Fix build warning on Linux
Mark Lobodzinski [Wed, 24 Aug 2016 14:09:29 +0000 (08:09 -0600)]
loader: Fix build warning on Linux

Change-Id: Iae099e6edffacdfad010aebe099e8e13d2ef8510

7 years agolayers: Update descriptor binding to use an ordered map
Tobin Ehlis [Mon, 22 Aug 2016 16:10:43 +0000 (10:10 -0600)]
layers: Update descriptor binding to use an ordered map

When dealing with dynamic offsets, the binding numbers, and array indices within
a binding, are all sequential.
This is according to the spec "Descriptor Set Binding" section which states,
"...entries are ordered by the binding numbers in the descriptor set layouts; and
within a binding array, elements are in order."

This means when processing the binding numbers to validate the dynamic offsets at
draw time, we should do so in order to make sure that the sequential dynamic offset
index correctly correlates with the dynamic offset being processed.

7 years agotests: Add InvalidCmdBufferDescriptorSetImageSamplerDestroyed test
Tobin Ehlis [Wed, 17 Aug 2016 23:00:07 +0000 (17:00 -0600)]
tests: Add InvalidCmdBufferDescriptorSetImageSamplerDestroyed test

This test hits 3 newly added checks of an invalid cmd buffer at submit time due to:
1. Bound descriptor set sampler being destroyed
2. Bound descriptor set image being destroyed
3. Bound descriptor set being destroyed

7 years agotests: Add InvalidCmdBufferDescriptorSetBufferDestroyed test
Tobin Ehlis [Wed, 17 Aug 2016 20:57:58 +0000 (14:57 -0600)]
tests: Add InvalidCmdBufferDescriptorSetBufferDestroyed test

This test creates a cmd buffer and binds a buffer-type descriptor set.
Then it detroys the buffer prior to submitting cmd buffer and verifies
that the cmd buffer is flagged as invalid.

7 years agotests: Fix DescriptorSetNotUpdated test comment
Tobin Ehlis [Wed, 17 Aug 2016 19:56:55 +0000 (13:56 -0600)]
tests: Fix DescriptorSetNotUpdated test comment

Remove incorrect DescriptorSetNotUpdated test comment and replace with
a correct TEST_DESCRIPTION.

7 years agolayers: Add cmd buffer binding for descriptor resources
Tobin Ehlis [Wed, 17 Aug 2016 19:33:44 +0000 (13:33 -0600)]
layers: Add cmd buffer binding for descriptor resources

This commit creates bindings between a cmd buffer and the images/buffers
and their memory allocations that are tied to that cmd buffer's active
descriptor slots (set/binding combination).
The active resources are anything that's in use during any of the draws
issued in the cmd buffer.
If any of the bound resources are deleted, the cmd buffer will become
invalid and an error will be issued on the next attempt to submit it.

7 years agolayers: Refactor functions to bing image/buffer to cmd buffer
Tobin Ehlis [Wed, 17 Aug 2016 19:12:19 +0000 (13:12 -0600)]
layers: Refactor functions to bing image/buffer to cmd buffer

The AddCommandBufferBinding[Image|Buffer]() functions both had an
unused parameter that was killed, and they both returned a bool
that was not needed so removed that too.
Also made layer_data* param const and put prototypes into
core_validation_types.h in prepration of using these functions
from the DescriptorSet class.

7 years agolayers: Add tracking between sampler and cmd buffer
Tobin Ehlis [Wed, 17 Aug 2016 17:10:41 +0000 (11:10 -0600)]
layers: Add tracking between sampler and cmd buffer

Update SAMPLER_NODE to inherit from BASE_NODE and keep track of
cb_bindings for sampler.
At draw time, add any bindings between cmd buffer and samplers that
are connected to active descriptors.
At DestroySampler() time, set CB_INVALID for any cmd buffers in
cb_bindings.
Also includes some additional plumbing to prepare for connecting
images/buffers that are tied to descriptor sets to cmd buffers that
those sets are bound to.

7 years agolayers: Only bind active sets to cmd buffers
Tobin Ehlis [Wed, 17 Aug 2016 15:49:13 +0000 (09:49 -0600)]
layers: Only bind active sets to cmd buffers

Don't create a binding between every set bound to a cmd buffer, but only
the sets that are verified active at draw time.
Gather up active descriptorset bindings in prepration of also binding the
resources from each individual active set to the cmd buffer.

7 years agolayers: Migrate PIPELINE_NODE to core_validation_types.h
Tobin Ehlis [Wed, 17 Aug 2016 13:55:55 +0000 (07:55 -0600)]
layers: Migrate PIPELINE_NODE to core_validation_types.h

Move PIPELINE_NODE struct to core_validation_types.h so that it's visible to
descriptorSet class. Update cmd buffer lastBound state to store ptr to
PIPELINE_NODE instead of VkPipeline which saves extra lookups.

7 years agolayers: Minor re-naming in core_validation
Tobin Ehlis [Thu, 21 Jul 2016 23:51:22 +0000 (17:51 -0600)]
layers: Minor re-naming in core_validation

Rename a bit of code as I touch it to match general code style.
Switch a few CamelCase to lower_case and use "dev_data" instead
of "my_data" as it's more descriptive.

7 years agolayers: Add descriptor sets to CB_INVALID tracking
Tobin Ehlis [Thu, 21 Jul 2016 20:40:22 +0000 (14:40 -0600)]
layers: Add descriptor sets to CB_INVALID tracking

This is start of a series intended to enable CB_INVALID tracking for
descriptor sets. Much of the tracking is already in place in the
special-purpose uniqueBoundSets data struct, so I'll be migrating
the tracking from that struct to the more general-purpose
object_bindings set.

7 years agolayers: GH873, Fix ETC2 RGBA format class size
Mark Lobodzinski [Tue, 23 Aug 2016 14:49:36 +0000 (08:49 -0600)]
layers: GH873, Fix ETC2 RGBA format class size

These formats were incorrectly specified as using an 8-byte storage
class, but each 4x4 block is actually compressed to 128 bits.

Change-Id: I33353cbe3574f0c640b68c8c3c544a286c79ed49

7 years agolayers: GH877, Clear up descriptor state messages
Mark Lobodzinski [Tue, 23 Aug 2016 17:12:05 +0000 (11:12 -0600)]
layers: GH877, Clear up descriptor state messages

Plumbed function name through for more descriptive error
messages from validate_and_update_drawtime_descriptor_state().

Change-Id: I109e14e07e6a5ba29c45dc3e0ad075ff3575d67f

7 years agolayers: Update layer details doc for new tests
Mark Lobodzinski [Mon, 22 Aug 2016 17:34:50 +0000 (11:34 -0600)]
layers: Update layer details doc for new tests

Change-Id: I9a0cca05f387c291494edf6970e0dd34d5922fe6

7 years agotests: Add DS Image Transfer Granularity tests
Mark Lobodzinski [Mon, 22 Aug 2016 17:29:38 +0000 (11:29 -0600)]
tests: Add DS Image Transfer Granularity tests

Add tests that exercise the drawstate image transfer granularity
validation checks.

Change-Id: Iae6faa8391e84e7922f6f48a088df06a027b36dd

7 years agolayers: Add Image Transfer Granularity checking
Mark Lobodzinski [Mon, 22 Aug 2016 15:21:03 +0000 (09:21 -0600)]
layers: Add Image Transfer Granularity checking

CmdCopyImage and CmdCopyImageToBuffer/CmdCopyBufferToImage have
parameters that must respect the Image Transfer Granularity
requirements set in queue family property minImageTransferGranularity.

Change-Id: Ic0fed33c201310bafe86f6f509a63b675de1d572

7 years agolayers: Update layer validation details doc
Mark Lobodzinski [Fri, 19 Aug 2016 17:03:01 +0000 (11:03 -0600)]
layers: Update layer validation details doc

Updated entry for new BufferImageCopy checks.

Change-Id: I85ea2eeacae6885fbd6729180167cbe1abe4c176

7 years agotests: Add BufferImageCopy tests
Mark Lobodzinski [Fri, 19 Aug 2016 16:53:26 +0000 (10:53 -0600)]
tests: Add BufferImageCopy tests

Added new test cases to MiscImageLayerTests for valid usage checks
on VkBufferImageCopy data.

Change-Id: I858b76199b3ff936f15a2cf1adc1b5df5e76d0b1

7 years agolayers: GH763, Add validation for VkBufferImageCopy
Mark Lobodzinski [Fri, 19 Aug 2016 14:50:15 +0000 (08:50 -0600)]
layers: GH763, Add validation for VkBufferImageCopy

Added valid usage checks for members of this structure used in
vkCmdCopyImageToBuffer and vkCmdCopyBufferToImage.

Change-Id: I62ec7b04504e91fa33c86d1a5b606ba8fb7a294a

7 years agolayers: Leave INDEX_BUFFER_BOUND set in set_cb_pso_status
Tony Barbour [Mon, 22 Aug 2016 22:10:02 +0000 (16:10 -0600)]
layers: Leave INDEX_BUFFER_BOUND set in set_cb_pso_status

Change-Id: I5ca986c95b97cdf97a0f65b0c34db32d91428645

7 years agodocs: Add description of new SC cases
Chris Forbes [Mon, 22 Aug 2016 04:53:12 +0000 (16:53 +1200)]
docs: Add description of new SC cases

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Allow get_fundamental_type to look through OpTypeImage
Chris Forbes [Mon, 22 Aug 2016 04:36:54 +0000 (16:36 +1200)]
layers: Allow get_fundamental_type to look through OpTypeImage

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Add positive test for use of input attachments
Chris Forbes [Mon, 22 Aug 2016 04:14:06 +0000 (16:14 +1200)]
tests: Add positive test for use of input attachments

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Validate fundamental type for input attachments
Chris Forbes [Mon, 22 Aug 2016 04:11:22 +0000 (16:11 +1200)]
layers: Validate fundamental type for input attachments

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Add test for type mismatch between input attachment and shader
Chris Forbes [Mon, 22 Aug 2016 04:02:09 +0000 (16:02 +1200)]
tests: Add test for type mismatch between input attachment and shader

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Correctly handle input attachment collection w/ arrays
Chris Forbes [Mon, 22 Aug 2016 03:31:18 +0000 (15:31 +1200)]
layers: Correctly handle input attachment collection w/ arrays

Fixes the test added in the previous commit

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Add test for array of input attachments
Chris Forbes [Mon, 22 Aug 2016 03:30:27 +0000 (15:30 +1200)]
tests: Add test for array of input attachments

This shows up a gap in the initial implementation. We want the error for
xs[1], which would previously not be generated at all.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Require every input attachment used by FS to be present.
Chris Forbes [Mon, 22 Aug 2016 03:20:11 +0000 (15:20 +1200)]
layers: Require every input attachment used by FS to be present.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Add helper to collect shader's use of input attachments
Chris Forbes [Mon, 22 Aug 2016 02:58:35 +0000 (14:58 +1200)]
layers: Add helper to collect shader's use of input attachments

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Add simple test for an input attachment not described in subpass
Chris Forbes [Mon, 22 Aug 2016 02:57:55 +0000 (14:57 +1200)]
tests: Add simple test for an input attachment not described in subpass

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Re-enable changes to InitState()
Cody Northrop [Mon, 22 Aug 2016 16:41:47 +0000 (10:41 -0600)]
tests: Re-enable changes to InitState()

The initial series was causing InitState() to be called
twice in tests using VKTriangleTest.

This is a combination of 4 commits:

  tests: Remove InitState from VKTriangleTest

  Revert "Revert "tests: Move device creation from Setup to InitState""
  This reverts commit 5690813b28260c0acbe54ed5f63a66b57d4f3eef.

  Revert "Revert "tests: Enable passing PhysicalDeviceFeatures to InitState""
  This reverts commit 5c61db858c9e83f6a25993ee6262bd5f1a817551.

  Revert "Revert "tests: Change IndependentBlend test to use new InitState parm""
  This reverts commit 24eca2239aab4a76fa2926e5e1fa48d2171c3e6a.

7 years agolayers: Fix spelling dynami->dynamic
Tobin Ehlis [Mon, 22 Aug 2016 14:12:23 +0000 (08:12 -0600)]
layers: Fix spelling dynami->dynamic

7 years agoloader: Fix CTS failures in simulate_oom tests.
Mark Young [Fri, 19 Aug 2016 21:25:08 +0000 (15:25 -0600)]
loader: Fix CTS failures in simulate_oom tests.

The simulate_oom tests continue the trend of testing what happens
when the user-provided allocators fail.  It validates two things:
1) That the loader returns the proper error message when this
occurs.
2) That the loader cleans up any allocated items prior to
returning.

Change-Id: Ic80ff4345e1f3524d5e11ce787b10c391a37d760

7 years agoadding vulkan.py extension.ifdef field to vulkan.py
David Hubbard [Fri, 19 Aug 2016 19:30:06 +0000 (13:30 -0600)]
adding vulkan.py extension.ifdef field to vulkan.py

Some extensions are disabled at compile time and must not be included
in generated code. Issue #72 gh72. This adds a new optional field
ifdef which contains the #define symbol to insert as a guard around
generated code.

Change-Id: I30b521dd1ff77d0db1608cb11c8c999cef40dff2

7 years agoRevert "tests: Move device creation from Setup to InitState"
Cody Northrop [Fri, 19 Aug 2016 15:57:31 +0000 (09:57 -0600)]
Revert "tests: Move device creation from Setup to InitState"

This reverts commit 010c49d26071d5619ddd8cd43f5c8026bee1a7f2.

7 years agoRevert "tests: Enable passing PhysicalDeviceFeatures to InitState"
Cody Northrop [Fri, 19 Aug 2016 15:57:19 +0000 (09:57 -0600)]
Revert "tests: Enable passing PhysicalDeviceFeatures to InitState"

This reverts commit 74e0ed29a55c083db127053a4c15a2d816a44c71.

7 years agoRevert "tests: Change IndependentBlend test to use new InitState parm"
Cody Northrop [Fri, 19 Aug 2016 15:57:10 +0000 (09:57 -0600)]
Revert "tests: Change IndependentBlend test to use new InitState parm"

This reverts commit f5085fdc45de29c82594c42bbaf71ed3517eb05e.

7 years agolayers: Fix spelling error in README
Nanley Chery [Tue, 12 Jul 2016 18:22:38 +0000 (11:22 -0700)]
layers: Fix spelling error in README

Change-Id: I2e6aa600f30d89d22ce5f6f1c2e84555ba8e0b71

7 years agotests: remove bad tests
Jeremy Hayes [Fri, 19 Aug 2016 15:30:27 +0000 (09:30 -0600)]
tests: remove bad tests

These were not supposed to be included in my last commit.

Change-Id: I5b6d6c415c80273dbda824479a71190cbdf4d507

7 years agotests: Add non-coherent MapMemory test cases
Mark Lobodzinski [Tue, 16 Aug 2016 16:03:30 +0000 (10:03 -0600)]
tests: Add non-coherent MapMemory test cases

Added test case to InvalidMemoryMapping. In configurations using an
incoherent memory type they will map, flush, and invalidate which
used to cause crashes.

Change-Id: Iced94c3a5cdce6e1b89a332eb5a5d9a5a9458250

7 years agolayers: GH820, MapMemory shadow copy alignment
Mark Lobodzinski [Mon, 15 Aug 2016 20:27:26 +0000 (14:27 -0600)]
layers: GH820, MapMemory shadow copy alignment

For host-visible non-coherent memory, the validation layers use a
shadow copy of the mapped memory region. Added proper alignment
for the shadow copy, fixed handling of offsets, and implemented
resolve of the shadow data on invalidate calls.

Change-Id: I88815799865d3a30c76e16cf96ace630e1bbcf2d

7 years agotests: add implicit layer tests
Jeremy Hayes [Mon, 15 Aug 2016 16:37:24 +0000 (10:37 -0600)]
tests: add implicit layer tests

Change-Id: I84e70b2eaafc59fa8d2c3642c87f3b908532445a

7 years agolayers: GH859 Fix error messages for viewport/scissors state
Tobin Ehlis [Thu, 18 Aug 2016 16:53:58 +0000 (10:53 -0600)]
layers: GH859 Fix error messages for viewport/scissors state

The checks are correct but error messages were backwards and stated
"contains" instead of "does not contain".

7 years agotests: Change IndependentBlend test to use new InitState parm
Tony Barbour [Fri, 12 Aug 2016 20:53:58 +0000 (14:53 -0600)]
tests: Change IndependentBlend test to use new InitState parm

Change-Id: Ied23b9241a6e093b66c76605f84481e33ebb2583

7 years agotests: Enable passing PhysicalDeviceFeatures to InitState
Tony Barbour [Fri, 12 Aug 2016 19:18:27 +0000 (13:18 -0600)]
tests: Enable passing PhysicalDeviceFeatures to InitState

Change-Id: I8eea20789594e6e0f738436e06233082efa963f9

7 years agotests: Move device creation from Setup to InitState
Tony Barbour [Fri, 12 Aug 2016 15:37:19 +0000 (09:37 -0600)]
tests: Move device creation from Setup to InitState

Change-Id: Ifdaac4fe570a7dafaf2b0cdf35ea1bc074aab548

7 years agodemos: Clean up vulkaninfo source formatting
Mark Lobodzinski [Thu, 18 Aug 2016 14:50:16 +0000 (08:50 -0600)]
demos: Clean up vulkaninfo source formatting

A few spots where clang-format is disabled need some cleanup.

Change-Id: I1adc64d479244fc5f655b3e3e7cd74d64499f682

7 years agolayers: VT59, Change query count errors to warnings
Mark Lobodzinski [Tue, 16 Aug 2016 15:06:15 +0000 (09:06 -0600)]
layers: VT59, Change query count errors to warnings

In patterns where an API call is normally made twice, the first with
a NULL pointer returning the count of structures to receive followed
by second call with a pointer to the appropriately-sized buffer, the
swapchain layer was returning validation errors if the size call was
made. However, this is legal behavior so these now return validation
warnings. Also updated the relevant validation tests.

Change-Id: I9f493b27bf4fa0bec6385499c76c5cece1ad86b9

7 years agotests: Disable LongFenceChain test
Tobin Ehlis [Wed, 17 Aug 2016 23:59:31 +0000 (17:59 -0600)]
tests: Disable LongFenceChain test

7 years agotests: Turn on some more tests that now pass.
Chris Forbes [Fri, 24 Jun 2016 05:06:56 +0000 (17:06 +1200)]
tests: Turn on some more tests that now pass.

One of these used to crash; the other fail. They both pass with the new
work tracking implementation.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Rework work tracking
Chris Forbes [Mon, 1 Aug 2016 03:15:30 +0000 (15:15 +1200)]
layers: Rework work tracking

This fixes cross-queue work tracking, while keeping everything else
working.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: GH819, Fix non-coherent memory shadow copy
Mark Lobodzinski [Tue, 16 Aug 2016 15:06:15 +0000 (09:06 -0600)]
layers: GH819, Fix non-coherent memory shadow copy

InvalidateMappedMemoryRanges was not updating core validation's
shadow copy of non-coherent memory.

Change-Id: I7b5e05791405871489014d6b08595c9bae941185

7 years agolayers: GH822, handle WHOLE_SIZE for mapped memory
Mark Lobodzinski [Mon, 15 Aug 2016 21:00:12 +0000 (15:00 -0600)]
layers: GH822, handle WHOLE_SIZE for mapped memory

A support routine for FlushMappedMemoryRanges and InvalidateMapped-
MemoryRanges ignored VK_WHOLE_SIZE, causing invalid memory accesses.

Change-Id: I28616faa1339a394a3462e72780efd1b852ac489

7 years agotests: post push resolution of Nvidia GH424Rework issues
Mark Mueller [Wed, 17 Aug 2016 21:23:23 +0000 (15:23 -0600)]
tests: post push resolution of Nvidia GH424Rework issues

vkEnumeratePhysicalDevices validation tests are not working on
recent NVidia drivers

Change-Id: Ie4985eef9ae27c8e1b80ea9388cea8f264950895

7 years agowinsdk: Create layer registry if it doesn't exist
Lenny Komow [Wed, 17 Aug 2016 20:50:13 +0000 (14:50 -0600)]
winsdk: Create layer registry if it doesn't exist

7 years agolayers: Fix new invalid queue index test
Mark Lobodzinski [Wed, 17 Aug 2016 19:26:28 +0000 (13:26 -0600)]
layers: Fix new invalid queue index test

Change-Id: Ib1b796c7901fe0377eda1d8b42083ddd1ec009a8

7 years agoRevert "tests: Fixing incorrect change w/GH424Rework"
Mark Lobodzinski [Wed, 17 Aug 2016 19:03:57 +0000 (13:03 -0600)]
Revert "tests: Fixing incorrect change w/GH424Rework"

This reverts commit c11756ae28cadb604e652232da2d7cf7124cee05.
Bad rebase -- this trashed some previous changes.

7 years agotests: Fixing incorrect change w/GH424Rework
Mark Mueller [Wed, 17 Aug 2016 15:03:17 +0000 (09:03 -0600)]
tests: Fixing incorrect change w/GH424Rework

A clarification fix was done incorrectly, this resolves that.

Change-Id: Ie093f72ee3d6daebf3f9fa8530893313ac282ba5

7 years agodocs: GH424 Update validation test documentation
Mark Mueller [Tue, 16 Aug 2016 19:51:38 +0000 (13:51 -0600)]
docs: GH424 Update validation test documentation

Doc changes to reflect test additions

Change-Id: I18488615b2323dc38505e6a2df18fd960ea56bf4

7 years agotests: GH424 Addition of Device Limits Validation tests
Mark Mueller [Thu, 4 Aug 2016 18:59:48 +0000 (12:59 -0600)]
tests: GH424 Addition of Device Limits Validation tests

Tests to challenge layer validation under these conditions:
1) INVALID_QUEUE_INDEX Check that queue family index is correct
     InvalidQueueIndexInvalidQuery

2) INVALID_QUERY Check that query is not in progress on
     vkEndCommandBuffer
     InvalidQueueIndexInvalidQuery

3) COUNT_MISMATCH Check that the Physical Device count
     value is not unreasonable.
     MismatchCountQueueCreateRequestedFeature

4) INVALID_QUEUE_CREATE_REQUEST Check that QueueFamilyIndex
     is reasonable on vkCreateDevice.
     MismatchCountQueueCreateRequestedFeature

5) INVALID_FEATURE_REQUESTED Check for feature requests
     that are invalid.
     MismatchCountQueueCreateRequestedFeature

Change-Id: Ib1589e24d6c9584e68779c93b91de927a177ec8d

7 years agolayers: GH424 add check of skip_call results to CreateDevice
Mark Mueller [Tue, 16 Aug 2016 15:47:31 +0000 (09:47 -0600)]
layers: GH424 add check of skip_call results to CreateDevice

skip_call result was ignored allowing for exception violations
under some test conditions.

Change-Id: Ied673a9b932210de52ed189c67221af60415cae9

7 years agotests: Add test for NULL-blit warnings
Mark Lobodzinski [Tue, 16 Aug 2016 17:51:39 +0000 (11:51 -0600)]
tests: Add test for NULL-blit warnings

Extended an image test to look for warnings upon calling vkCmdBlitImage
with NULL blit extents.

Change-Id: I5a8f34c2ac8b9a1f074311a16e8635cf34c1e2bc

7 years agolayers: LX581, Warn for null-region blits
Mark Lobodzinski [Tue, 16 Aug 2016 17:51:12 +0000 (11:51 -0600)]
layers: LX581, Warn for null-region blits

Parameters specifying the extents for VkCmdBlitImage are often
misinterpreted from the spec. Add warningis if the extents do not
specify a positively-sized area.

Change-Id: I11324dcf4523b094d7545f406d5f87a1145e0563

7 years agotests: Modify swapchain test for PV messages
Mark Lobodzinski [Mon, 15 Aug 2016 22:21:08 +0000 (16:21 -0600)]
tests: Modify swapchain test for PV messages

Parameter_validation now handles parameter and valid usage checks.
Updated the SetDesiredMessage text for these cases.

Change-Id: Ib3d228eae9b347163a9a347e04db752d421b1291

7 years agolayers: Run swapchain source through clang-format
Mark Lobodzinski [Mon, 8 Aug 2016 20:41:55 +0000 (14:41 -0600)]
layers: Run swapchain source through clang-format

Change-Id: Iaebe81e34e76d4760d1097da23d52d7ca2ef4273

7 years agolayers: Some simple style tweaks for swapchain
Mark Lobodzinski [Mon, 8 Aug 2016 20:36:58 +0000 (14:36 -0600)]
layers: Some simple style tweaks for swapchain

Fixed some variable names and removed c-style casts.

Change-Id: I994ca311665a59d0f81ce0cfdeda4a66deb632be

7 years agolayers: Removed swapchain pNext validation
Mark Lobodzinski [Mon, 8 Aug 2016 17:23:58 +0000 (11:23 -0600)]
layers: Removed swapchain pNext validation

This validation is already performed in parameter_validation.

Change-Id: I5fd8e92c885300aa35537d825ea67fabb723062e

7 years agolayers: Fixed swapchain layer warning messages
Mark Lobodzinski [Mon, 8 Aug 2016 17:20:36 +0000 (11:20 -0600)]
layers: Fixed swapchain layer warning messages

Macro used incorrect parameter layout -- removed and in-lined log_msg
calls.

Change-Id: I2a21be76f83eed9fb3055f6f57f22204c9ea76f0

7 years agolayers: Removed unused macro in swapchain
Mark Lobodzinski [Mon, 8 Aug 2016 17:14:52 +0000 (11:14 -0600)]
layers: Removed unused macro in swapchain

LOG_PERF_WARNING was not used.

Change-Id: I89f84611b37a809493e3d23c53809263d48b3065

7 years agolayers: Moved swapchain QFI checks into function
Mark Lobodzinski [Mon, 8 Aug 2016 17:09:27 +0000 (11:09 -0600)]
layers: Moved swapchain QFI checks into function

Correct object pointers passed now.

Change-Id: Ib18e1849da2761373386eb44c2549be7c28752ab

7 years agolayers: Removed swapchain ZERO_VALUE check
Mark Lobodzinski [Mon, 8 Aug 2016 16:41:18 +0000 (10:41 -0600)]
layers: Removed swapchain ZERO_VALUE check

This validation is already performed in parameter_validation.

Change-Id: I3c1a7f17d68fa81f7770b7dd88cb075be8e59175

7 years agolayers: Remove swapchain WRONG_STYPE checks
Mark Lobodzinski [Mon, 8 Aug 2016 16:34:56 +0000 (10:34 -0600)]
layers: Remove swapchain WRONG_STYPE checks

This validation is already performed in parameter_validation.

Change-Id: I0b9e83cf241bfa5de93c90898f6cd5b6d9b745b5

7 years agolayers: In-line swapchain zero_prior_count macro
Mark Lobodzinski [Mon, 8 Aug 2016 16:29:34 +0000 (10:29 -0600)]
layers: In-line swapchain zero_prior_count macro

Change-Id: Ib9c58f05ef045f0450f1ba62dfc7ea4498ac119e

7 years agolayers: Remove swapchain INVALID_COUNT macro
Mark Lobodzinski [Mon, 8 Aug 2016 16:18:49 +0000 (10:18 -0600)]
layers: Remove swapchain INVALID_COUNT macro

Change-Id: I44d19882af69541cfe9876a22fecc0a09056ba0b

7 years agolayers: Remove swapchain NULL_POINTER checks
Mark Lobodzinski [Mon, 8 Aug 2016 15:57:09 +0000 (09:57 -0600)]
layers: Remove swapchain NULL_POINTER checks

These are all overed in parameter_validation.

Change-Id: I23a7fc281414b6b8bcf30c5a9660560f2b51177f

7 years agolayers: Removed LOG_ERROR_NON_VALID_OBJ macro
Mark Lobodzinski [Mon, 8 Aug 2016 15:43:22 +0000 (09:43 -0600)]
layers: Removed LOG_ERROR_NON_VALID_OBJ macro

Change-Id: I0609694a3743ca764bcda6de66c0431fb63c1ad1

7 years agolayers: Replace swapchain LOG_ERROR macros
Mark Lobodzinski [Mon, 8 Aug 2016 15:38:42 +0000 (09:38 -0600)]
layers: Replace swapchain LOG_ERROR macros

Fixed some missing return codes, incorrect parameter order, bad object
handles, and instance-device mismatches. Inlined log-error calls.

Change-Id: I6d272cafcd8554f068896312a2b0f41a42d108be

7 years agolayers: Fix typo in layer validation details doc
Mark Lobodzinski [Tue, 16 Aug 2016 14:03:31 +0000 (08:03 -0600)]
layers: Fix typo in layer validation details doc

DynamicBlendConstantsNotBound was misspelled.

Change-Id: I33f4d53e336dc39b5f23583ee24df88441a339ac

7 years agotests: Fix typo in test comment
Mark Lobodzinski [Mon, 15 Aug 2016 22:51:19 +0000 (16:51 -0600)]
tests: Fix typo in test comment

Change-Id: Ibcb07fe5f357e001e9d91897eebd1dfce78198d6

7 years agolayers: Update details document for new PV test
Mark Lobodzinski [Wed, 10 Aug 2016 21:12:32 +0000 (15:12 -0600)]
layers: Update details document for new PV test

Added test to use a non-solid fillmode when this feature is disabled.

Change-Id: If43d8d2f30fa892b96cb90585eb0513649c535f7

7 years agotests: Added test for invalid polygonMode
Cort [Wed, 27 Jul 2016 16:51:27 +0000 (09:51 -0700)]
tests: Added test for invalid polygonMode

Test checks that polygonMode values are valid when
fillModeNonSolid feature is disabled.

Change-Id: I1c9cbf73a03da80bb85b8789ec5053ffbf4a733a

7 years agolayers: GH785, Validate rasterinfo->polygonMode
Mark Lobodzinski [Tue, 9 Aug 2016 19:10:51 +0000 (13:10 -0600)]
layers: GH785, Validate rasterinfo->polygonMode

If fillModeNonSolid is not enabled, polygonMode cannot be set to
POINT or LINE.

Change-Id: I6cfdfac8f5c9ff7d27b94bf0aa80ae1249b0ce25

7 years agotests: Fixed typo in test name
Cort [Wed, 27 Jul 2016 16:51:27 +0000 (09:51 -0700)]
tests: Fixed typo in test name

DynamiBlendConstantsNotBound -> DynamicBlendConstantsNotBound

Change-Id: If30b93d8cfb32dade686d44b615b772f6504ee17

7 years agolayers: Fix missing PV WSI registration
Mark Lobodzinski [Mon, 15 Aug 2016 22:22:50 +0000 (16:22 -0600)]
layers: Fix missing PV WSI registration

Change-Id: I1c924977a420bc7a417710b82f0a42f4ae5dd4c3

7 years agowinsdk: Move uninstall log to temp
Lenny Komow [Mon, 15 Aug 2016 20:41:26 +0000 (14:41 -0600)]
winsdk: Move uninstall log to temp

7 years agolayers: Style fixup, don't use pass-by-reference params
Tobin Ehlis [Fri, 12 Aug 2016 20:26:31 +0000 (14:26 -0600)]
layers: Style fixup, don't use pass-by-reference params

Change pass-by-reference to a ptr to comply with Google style guide.
This way it's more clear that function is modifying param, especially when calling.

7 years agolayers: Naming corrections
Tobin Ehlis [Fri, 12 Aug 2016 20:12:44 +0000 (14:12 -0600)]
layers: Naming corrections

Some minor fix-ups to variable names and comments for memory aliasing code.

7 years agolayers: Refactor set/validate memory valid functions
Tobin Ehlis [Thu, 11 Aug 2016 01:11:54 +0000 (19:11 -0600)]
layers: Refactor set/validate memory valid functions

Create custom image and buffer versions of functions to minimize casting.

7 years agolayers: Push some casts into helper functions
Tobin Ehlis [Thu, 11 Aug 2016 00:01:27 +0000 (18:01 -0600)]
layers: Push some casts into helper functions

7 years agolayers: Handle memory mapped prior to object binding
Tobin Ehlis [Wed, 10 Aug 2016 23:00:51 +0000 (17:00 -0600)]
layers: Handle memory mapped prior to object binding

This adds initial support for memory that is updated via a MapMemory() call
prior to an object being bound. Initially any mapped allocation will just have
global_valid set for whole allocation. This value is then picked up by any
ranges made off of that allocation.

Really, we need to create new mapped regions and mark them valid, then make
sure that any overlapped objects pick up valid from mapped regions. This
requires more thought and design, though, so commiting this changes as a
simpler and incomplete initial fix.