platform/upstream/Vulkan-Tools.git
7 years agolayers: Add VUs 1275, 1276, 1277 related to gh1507
Dave Houlton [Fri, 3 Mar 2017 00:00:10 +0000 (17:00 -0700)]
layers: Add VUs 1275, 1276, 1277 related to gh1507

Adds 3 new valid usage checks related to the bugfix, and the
layer_validation_tests code to exercise 2 of them. The third check,
01277, cannot be provoked by a test because it would require a
compressed texture format with block z-dimension > 1, which does
not (currently) exist for Vulkan.

Change-Id: I6c467e64c420b6a453af57f7ff86e1465e132988

7 years agolayers, Fix checks for GH 1507
Dave Houlton [Wed, 1 Mar 2017 23:23:25 +0000 (16:23 -0700)]
layers, Fix checks for GH 1507

Bugfix and refactor for github issue 1507 (and lunar exchange #652).
Fixes buffer size calculation for compressed textures when copy
extent is less than block size, corrected for mip level. Layer tests
modified to avoid breakage from this fix.

Change-Id: If91d6f8c7ce17a3e012923304a3b178e750d2659

7 years agolayers: Fix invalid push constant checks (GH953)
Karl Schultz [Fri, 24 Feb 2017 22:45:05 +0000 (15:45 -0700)]
layers: Fix invalid push constant checks (GH953)

Rework of invalid push constant checks, motivated mostly
by some spec updates and prior bad assumptions.

- Add check/test for a shader stage flag being set more
  than once in CreatePipelineLayout.
- Remove checks and tests having to do with warning about
  overlapping ranges in CreatePipelineLayout.  Ranges can
  certainly overlap when used in different stages.  And
  the prohibition of more than one range with the same
  stage flag removes the possibility of overlap in the same
  stage.  These checks were warnings and so probably not
  noticed.

Fixes #953
Finishes VU 00871

Change-Id: Icc9d3d84fa3132f266075f2f1d45c243e9e1a65f

7 years agoloader: gh1528 - Move generated files
Mark Young [Mon, 6 Mar 2017 20:57:13 +0000 (13:57 -0700)]
loader: gh1528 - Move generated files

Move the loader-specific generated files into the loader binary
folder when built.

Change-Id: Ib5f04eada8eb0b89d1d5e50adaf1e964d4f1a6d6

7 years agolayers: Added skip_checks to rangeIntersect()
Cort Stratton [Fri, 3 Mar 2017 16:50:51 +0000 (08:50 -0800)]
layers: Added skip_checks to rangeIntersect()

This allows callers to skip redundant/unnecessary checks
outside the validation path.

7 years agolayers: GH373 Add memory size/align tests&checks
Cort Stratton [Fri, 17 Feb 2017 20:50:01 +0000 (12:50 -0800)]
layers: GH373 Add memory size/align tests&checks

7 years agolayers: Fix copy/paste errors in BindBufferMemory
Cort Stratton [Fri, 17 Feb 2017 20:43:41 +0000 (12:43 -0800)]
layers: Fix copy/paste errors in BindBufferMemory

Incorrect objectType and srcObject arguments to log_msg()

7 years agolayers: Refactor InsertMemoryRange() for pre/post
Cort Stratton [Wed, 15 Feb 2017 21:40:43 +0000 (13:40 -0800)]
layers: Refactor InsertMemoryRange() for pre/post

- Added new ValidateInsert*MemoryRange(), called from
  PreCallValidateBind*Memory().
- Moved all validation from InsertMemoryRange() into the new function.
- Moved call to Insert*MemoryRange() into PostCallRecordBind*Memory().

7 years agoexternals: Update GitHub master commit refs
Mike Weiblen [Mon, 6 Mar 2017 17:27:15 +0000 (10:27 -0700)]
externals: Update GitHub master commit refs

glslang_revision 33f85b6e
spirv-tools_revision 11fbe5dc

Change-Id: I07a98cd122a8c167b123afcc4787c6c05b29c5c8

7 years agoloader: Fix several leaks
Mark Young [Fri, 3 Mar 2017 22:28:57 +0000 (15:28 -0700)]
loader: Fix several leaks

Fix several leaks caught by Valgrind.  This change should fix all
memory leaks caught by David Hubbard in pull-request #811.

Change-Id: I55d7f3a6abbc32fde182702c4b9cf1041107c6df

7 years agoDocs: Fix a typo in BUILD.md
Igor Vuk [Fri, 3 Mar 2017 21:34:39 +0000 (22:34 +0100)]
Docs: Fix a typo in BUILD.md

7 years agoDocs: Fix a typo in README.md
Igor Vuk [Fri, 3 Mar 2017 21:26:43 +0000 (22:26 +0100)]
Docs: Fix a typo in README.md

7 years agodocs: Add new layer registries to loader doc
Lenny Komow [Thu, 2 Mar 2017 18:29:03 +0000 (11:29 -0700)]
docs: Add new layer registries to loader doc

Change-Id: I185d37096db07585d8b4015201656937fbf5714d

7 years agoloader: gh1153 - Modify layer search path
Lenny Komow [Thu, 2 Mar 2017 00:22:29 +0000 (17:22 -0700)]
loader: gh1153 - Modify layer search path

The loader will now seach HKEY_CURRENT_USER in addition to
HKEY_LOCAL_MACHINE when looking up layers in the registries.

Change-Id: I899dc7d65a2fe08f1e471fa8dccba5255f8ef7b7

7 years agoscripts: Update loader automation
Mark Young [Wed, 1 Mar 2017 23:22:23 +0000 (16:22 -0700)]
scripts: Update loader automation

Merge a few if's together to make the code easier to follow.

Change-Id: I2453c8217da81befb4f44af19241c13c4aaef8af

7 years agoloader: Fix handling of surface parameters
James Jones [Wed, 1 Mar 2017 01:26:09 +0000 (17:26 -0800)]
loader: Fix handling of surface parameters

The loader code generation scripts had a bug that
caused all the surface->ICD surface translation C
code to be placed inside a block that only ran if
the ICD didn't support the extension function,
making it effectively a no-op.  ICDs that
supported the extension were instead called with
the un-translated surface handle, which could
cause a crash if they were expecting their local
surface handle.

Also, speculatively fix up return handling in this
same class of functions by handling the void
return type.

7 years agolayers: Remove redundant validation
Jeremy Hayes [Tue, 28 Feb 2017 16:44:45 +0000 (09:44 -0700)]
layers: Remove redundant validation

Remove redundant validation from ValidateCmdBufImageLayouts.

Change-Id: Ia7474e0ca7d0429a8413500f548e1cfbe9f708f1

7 years agolayers: Use GetStateStructPtrFromObject rather than open-coding
Chris Forbes [Wed, 1 Mar 2017 03:36:16 +0000 (16:36 +1300)]
layers: Use GetStateStructPtrFromObject rather than open-coding

Now symmetric with the DecrementResources path, and much less code.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Remove redundant validation
Jeremy Hayes [Mon, 27 Feb 2017 22:09:03 +0000 (15:09 -0700)]
layers: Remove redundant validation

Remove redundant validation from ValidateOrIncrementBoundObjects.

Change-Id: I98f9de491d83788cf0b19d4c606d239e1a915e58

7 years agolayers: Validate CONCURRENT img/buf queuefamilies
Mark Lobodzinski [Tue, 28 Feb 2017 14:59:46 +0000 (07:59 -0700)]
layers: Validate CONCURRENT img/buf queuefamilies

All buffers and images created with SHARING_MODE_CONCURRENT can only
be used on queues matching one of thier designated queue families.

Change-Id: Ia4a532610125d6481a6de5dbd18727a98f815da9

7 years agolayers: Prevent bad node access
Mark Lobodzinski [Mon, 27 Feb 2017 21:04:47 +0000 (14:04 -0700)]
layers: Prevent bad node access

Change-Id: I6b08302b069d9796c126422a2df90243d82dc225

7 years agoloader: Remove floating file
Mark Young [Tue, 28 Feb 2017 17:17:18 +0000 (10:17 -0700)]
loader: Remove floating file

I had removed the need for loader/table_ops.h in my loader
automatic generation changes, but forgot to remove the file.

Change-Id: Ide46609d9eda354b712844782b97af6f1cc09ef0

7 years agolayers: Add VU data & new entry point
Mike Weiblen [Tue, 21 Feb 2017 02:43:02 +0000 (19:43 -0700)]
layers: Add VU data & new entry point

Add logging of VU data and a more detailed check of
EnumeratePhysicalDeviceGroupsKHX to core validation.

Change-Id: Id17a06063673b0f47cdaf8d051974887205d2f6d

7 years agovulkan: update to header 1.0.42
Mark Young [Tue, 28 Feb 2017 16:58:04 +0000 (09:58 -0700)]
vulkan: update to header 1.0.42

Updated all necessary files to 1.0.42.  This includes the various
headers as well as the loader, and the parameter validation, object
tracking, and threading layers.  Additionally, bump all layer JSON
files to 1.0.42.

Also, in this change:
  - Enable loader extension automation so that the loader now
    generates all extension entry-points automatically during build
    to reduce likelihood of missing a critical piece on header
    update.
  - Enable layer dispatch table extension automation for the same
    reason.
  - Fixes from Mark Lobodzinski and Tony Barbour to resolve crash
    in loader when working with Intel's Windows driver due to
    GetInstanceProcAddr getting called on inappropriate command
    names.

Change-Id: Ic18d3fac2e145c386c0192031deb5089c91a00d8

7 years agolayers: Special-case threading GetSwapchainImages
Mark Lobodzinski [Tue, 28 Feb 2017 22:09:31 +0000 (15:09 -0700)]
layers: Special-case threading GetSwapchainImages

This API is a special-case for the code-gen in that it sometimes
returns an array of images. These do not need to be counted by
start/finishReadObject and so were moved into the non-generated
part of the layer source.

Change-Id: Iaaab9143abadbf025b5f3c118aa26dae3c6f1bec

7 years agolayers: Fix state recorded for swapchain images
Chris Forbes [Tue, 28 Feb 2017 01:25:58 +0000 (14:25 +1300)]
layers: Fix state recorded for swapchain images

Reorder the fields to match the declaration, initialize tiling & type.
Previously the image type ended up as VK_IMAGE_TYPE_1D due to the
default initialization, which caused bad behavior in later validation.

Fixes #1508.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Factor out marking of first use as read or write...
Chris Forbes [Tue, 28 Feb 2017 05:59:20 +0000 (18:59 +1300)]
layers: Factor out marking of first use as read or write...

.. and make the handling of VK_ATTACHMENT_UNUSED consistent across all
cases. Previously we could end up with useless tracking of
VK_ATTACHMENT_UNUSED.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: remove attachment_first_layout tracking
Chris Forbes [Tue, 28 Feb 2017 05:46:44 +0000 (18:46 +1300)]
layers: remove attachment_first_layout tracking

Nothing uses this.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Consider resolve attachments to be written in renderpass
Chris Forbes [Tue, 28 Feb 2017 04:40:29 +0000 (17:40 +1300)]
layers: Consider resolve attachments to be written in renderpass

Previously, if there was a later read of the attachment within the
renderpass, we'd mistakenly record this attachment as being read-first,
and insist on its contents having been made valid by some write prior to
the renderpass.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agoexternals: Update GitHub master commit refs
Mike Weiblen [Tue, 28 Feb 2017 18:47:46 +0000 (11:47 -0700)]
externals: Update GitHub master commit refs

glslang_revision f67f9d7e
spirv-headers_revision 88d94037
spirv-tools_revision 4ef3b3e0

Change-Id: Icc3432fcaeb1511579e816f521f8454f2921f2da

7 years agolayers: Add PreCallRecord call to CmdPipelineBarrier
Mark Lobodzinski [Mon, 27 Feb 2017 20:08:59 +0000 (13:08 -0700)]
layers: Add PreCallRecord call to CmdPipelineBarrier

Change-Id: Ibf2f742d85f002c7d4993db8968c33a537b76dce

7 years agolayers: Split layout transition validation/recording
Mark Lobodzinski [Mon, 27 Feb 2017 19:56:14 +0000 (12:56 -0700)]
layers: Split layout transition validation/recording

Split TransitionImageLayouts and TransitionImageAspectLayouts into
ValidateXxx and TransitionXxx routines.

Change-Id: I19666e5ccc444cfc23304fd35aa1b9b18b039499

7 years agolayers: Add PreCallValidate to CmdPipelineBarrier
Mark Lobodzinski [Mon, 27 Feb 2017 18:12:39 +0000 (11:12 -0700)]
layers: Add PreCallValidate to CmdPipelineBarrier

Change-Id: I7e517ec023c2989eb5f977bdbf580e24b4526286

7 years agolayers: Add notes to Valid Usage DB
Mike Weiblen [Mon, 27 Feb 2017 19:49:58 +0000 (12:49 -0700)]
layers: Add notes to Valid Usage DB

Change-Id: I590864e3ad5cc454d05404763faf5613aaf0b079

7 years agolayers: Added more format checks to utils
Arda Coskunses [Sat, 25 Feb 2017 18:34:37 +0000 (11:34 -0700)]
layers: Added more format checks to utils

Change-Id: I1f91403656ddb9b69e3c519b35b95a48f3ac2bb4

7 years agolayers: GL168, fix bad compressed texel block size
Mark Lobodzinski [Fri, 24 Feb 2017 15:53:14 +0000 (08:53 -0700)]
layers: GL168, fix bad compressed texel block size

The image<->buffer copy validation was checking against texel block
sizes, but needed the block size in byte. Fixed the bad validation
errors and renamed existing util function and updated a compressed
texture size to match the spec.

Change-Id: I40b9635a4fab131ab1525da51e94c4c5577217be

7 years agotests: Add test that uses object on wrong device
Mike Schuchardt [Tue, 21 Feb 2017 16:48:06 +0000 (09:48 -0700)]
tests: Add test that uses object on wrong device

Exercise new object tracker handle check by trying to delete a render
pass on the wrong VkDevice.

Change-Id: I4480c5210d399c46b22e4c34630d76922aa934e3

7 years agolayers: Check all devices for valid object handles
Mike Schuchardt [Tue, 14 Feb 2017 22:33:52 +0000 (15:33 -0700)]
layers: Check all devices for valid object handles

Additional check in ValidateObject to distinguish between an invalid
object and an object that was created on another device.

Change-Id: I939ca7a23df47ad5809e46c780e084085f141c13

7 years agolayers: GH1489, fix CmdClearAttachments validation
Mark Lobodzinski [Wed, 22 Feb 2017 17:55:30 +0000 (10:55 -0700)]
layers: GH1489, fix CmdClearAttachments validation

Calling CmdClearAttachments in a secondary command buffer could
result in bad validation errors as existing checks rely upon
RenderPass begin info data that may not yet be present. Good
validation for this case will come in a follow-on patch series.

Change-Id: Ib169e26f506124f0c1ad75f57de3b6b5146df872

7 years agolayers: Fix a bug in depth/stencil packing
Dave Houlton [Tue, 21 Feb 2017 22:59:08 +0000 (15:59 -0700)]
layers: Fix a bug in depth/stencil packing

Fixed incorrect size calculations for image<->buffer copies
due to special packing rules of depth and stencil formats.
Added test code to layer_validation_tests ImageBufferCopyTests to
exercise these checks.

Change-Id: I90446379ba8888bf91eda6567e18fa1aae9593b1

7 years agobuild: Change appveyor to build VS 2013 and 2015
Karl Schultz [Wed, 22 Feb 2017 20:41:55 +0000 (13:41 -0700)]
build: Change appveyor to build VS 2013 and 2015

Change-Id: Idccb248aa46a5028b9c28d5487760c749a8d61e2

7 years agodemos: Use device local heap for depth
Jeremy Hayes [Wed, 22 Feb 2017 15:53:13 +0000 (08:53 -0700)]
demos: Use device local heap for depth

Fix GH 116: Cube demo does not allocate depth buffer in device local
heap.

Change-Id: Ic368bc039fc555f0d8739b0aeb6648237a6fcc5c

7 years agolayers: Move code to preferred cpp file
Mike Weiblen [Tue, 21 Feb 2017 21:32:53 +0000 (14:32 -0700)]
layers: Move code to preferred cpp file

PreCallValidateGetImageSubresourceLayout() from core_validation.cpp
to buffer_validation.cpp

Change-Id: Ic55e049fab28384d30768e8c590f158e603dd343

7 years agotests: VU 732, 733, 739, 740 tests
Mike Weiblen [Fri, 10 Feb 2017 04:25:59 +0000 (21:25 -0700)]
tests: VU 732, 733, 739, 740 tests

Create ExerciseGetImageSubresourceLayout() for varioud VU tests
of vkGetImageSubresourceLayout().

Update VU database to indicate implemented tests for those VUs.

Change-Id: I961d9ab54f35d307a87dedcc550d4d72af927dac

7 years agolayers: VU 732, 733, 739, 740 checks GH-402
Mike Weiblen [Tue, 21 Feb 2017 03:57:40 +0000 (20:57 -0700)]
layers: VU 732, 733, 739, 740 checks GH-402

Implement several Valid Usage checks in
PreCallValidateGetImageSubresourceLayout()

Update VU database to mark check_implemented flag to Y.

Change-Id: I04f3281012889c03aece121ecf6726437054040f

7 years agolayers: Refactor for PreCallValidate
Mike Weiblen [Tue, 21 Feb 2017 02:43:02 +0000 (19:43 -0700)]
layers: Refactor for PreCallValidate

Refactor vkGetImageSubresourceLayout() validation out to separate
PreCallValidateGetImageSubresourceLayout() function.

Cleanup existing Valid Usage check 00741.

Change-Id: Id17a06063673b0f47cdaf8d051974887205d2f6d

7 years agoexternals: update external GitHub commits refs
Mike Weiblen [Tue, 21 Feb 2017 05:21:09 +0000 (22:21 -0700)]
externals: update external GitHub commits refs

Update LVL externals to top of GitHub master branches:

glslang_revision 8f674e821e1e5f628474b21d7fe21af2e86b5fb4
spirv-headers_revision b6dca2397d512e4db62f051a47bb5334d5d44360
spirv-tools_revision c0949703b1264c33df45584efba50a8444b53022

Change-Id: I155c06206267b20c6fbb23fd3692259ad285be1b

7 years agoloader: Configurable fallback search paths
Benjamin Saunders [Sun, 19 Feb 2017 19:14:24 +0000 (11:14 -0800)]
loader: Configurable fallback search paths

This makes it easier for non-FHS distributions to behave well when the
loader is used by a SUID process or in an otherwise unusual environment.

7 years agoloader: Fix a few potential overruns
Mark Young [Fri, 17 Feb 2017 16:02:23 +0000 (09:02 -0700)]
loader: Fix a few potential overruns

Fixed a few places a strcpy or strcat could overrun.

Change-Id: I58184bd418ae5ee4596a40bf66ef2ab41400ee55

7 years agoexternals: Update script to take URLs as params
Mike Weiblen [Fri, 17 Feb 2017 00:00:35 +0000 (17:00 -0700)]
externals: Update script to take URLs as params

To provide flexibility in which git repositories are used as the
upstream source for LVL's externals, remove the hardcoded repo URLs
from the update scripts, and instead read those URLs from parameter
files.

Also fix typos and comments.

Change-Id: Ic1b49fcf30d37b602e20bf3f83eb5991847476dc

7 years agoheader: Update to Vulkan 1.0.41
Mark Lobodzinski [Fri, 17 Feb 2017 16:01:48 +0000 (09:01 -0700)]
header: Update to Vulkan 1.0.41

   updated:
      - include/vulkan/vk_platform.h
      - include/vulkan/vulkan.h
      - scripts/generator.py
      - scripts/cgenerator.py
      - scripts/lvl_genvk.py
      - scripts/reg.py
      - scripts/vk.xml
      - include/vulkan/vulkan.hpp
      - layers/tests json files
      - loader SOVERSION

Change-Id: I1e7c3e39206be3c6d2c12b46c438a1fb9343945e

7 years agolayers:RenderPass depth/stencil layout transition
Tobin Ehlis [Thu, 16 Feb 2017 20:21:20 +0000 (13:21 -0700)]
layers:RenderPass depth/stencil layout transition

Fixes #1454

For image views into depth/stencil images we need to make sure that
both the depth and stencil aspects have their layouts transitioned to
the initialLayout setting for the first subpass.

7 years agolayers: Fix AllocateDescriptorSets in threading
Mark Lobodzinski [Thu, 16 Feb 2017 18:45:27 +0000 (11:45 -0700)]
layers: Fix AllocateDescriptorSets in threading

Needed to special case this routine to skip validating objects
before creation. Caught in CTS testing.

Change-Id: Ic1c1b69bd1d75a5742c8b709624153db6af71885

7 years agolayers: Remove image layer source/build
Mark Lobodzinski [Wed, 15 Feb 2017 21:50:53 +0000 (14:50 -0700)]
layers: Remove image layer source/build

Change-Id: If1fd066048f6eb440298c0f1bb7117a4b9d8100d

7 years agoandroid: Update build to skip image layer
Mark Lobodzinski [Wed, 15 Feb 2017 21:15:53 +0000 (14:15 -0700)]
android: Update build to skip image layer

All image layer functionality has been moved into the core_validation
layer.

Change-Id: I980e279626e4e3f29c5068240260a737a5a707b1

7 years agoloader: Remove image layer from standard_validation
Mark Lobodzinski [Wed, 15 Feb 2017 21:46:24 +0000 (14:46 -0700)]
loader: Remove image layer from standard_validation

Change-Id: I54a1c0580034c2676defd1408699201568ffaf6f

7 years agodemos: Remove image layer references
Mark Lobodzinski [Wed, 15 Feb 2017 21:43:21 +0000 (14:43 -0700)]
demos: Remove image layer references

Change-Id: I937f1387ca6d4405cbceea12d66e97985d367bbd

7 years agolayers: Remove image layer from stats script
Mark Lobodzinski [Wed, 15 Feb 2017 21:57:47 +0000 (14:57 -0700)]
layers: Remove image layer from stats script

Change-Id: I9c24d4f8e7e375d3e78280e0bfffe319c4ab64a9

7 years agolayers: Remove image layer refs from docs
Mark Lobodzinski [Wed, 15 Feb 2017 21:34:10 +0000 (14:34 -0700)]
layers: Remove image layer refs from docs

Change-Id: I5fd91fd3b1697ca8c27cc89fea016ce131a6a9e6

7 years agolayers: Update buffer-image copy routines for style
Mark Lobodzinski [Wed, 15 Feb 2017 21:11:12 +0000 (14:11 -0700)]
layers: Update buffer-image copy routines for style

Change-Id: Id768e9e8967c687e7592169bae6d40652b58fa4f

7 years agolayers: Separate val/state updates in buff-img copy
Mark Lobodzinski [Wed, 15 Feb 2017 20:58:23 +0000 (13:58 -0700)]
layers: Separate val/state updates in buff-img copy

Moved state updates out of precallvalidate routines into
precallrecord routines.

Change-Id: If13e8a14cabc2b63a53f5369c33b1e632b15ff3a

7 years agolayers: Move buffer/image validation out of CV
Mark Lobodzinski [Wed, 15 Feb 2017 20:45:18 +0000 (13:45 -0700)]
layers: Move buffer/image validation out of CV

Moved guts of buffer-image-copy validation out of the core_validation
module and into the buffer_validation module, integrating with the
PreCallValidateXxx routines.

Change-Id: Ia2f867b96532eee773d0a6b899fbff160ac7b4d6

7 years agolayers: Move image layer image-buffer-copy to CV
Mark Lobodzinski [Wed, 15 Feb 2017 19:59:00 +0000 (12:59 -0700)]
layers: Move image layer image-buffer-copy to CV

Moved the image layer validation for buffer-image copies to the
buffer validation module.

Change-Id: If8ff8aa183f88560dc5db9d59c92346ee47b01e9

7 years agolayers: Fix validation routine name typo
Mark Lobodzinski [Thu, 16 Feb 2017 17:43:18 +0000 (10:43 -0700)]
layers: Fix validation routine name typo

Change-Id: I2b102c048131cd875888df2196f41480c8c1eb75

7 years agolayers: Add checks&tests to Img-Buf copy - GH284
Dave Houlton [Fri, 3 Feb 2017 00:26:23 +0000 (17:26 -0700)]
layers: Add checks&tests to Img-Buf copy - GH284

Added 16 VU checks for CmdCopyImageToBuffer and CmdCopyBufferToImage
Fixed 1 test in MiscImageLayerTests
Added 12 test in ImageBufferCopyTests

Individual commits:
GH284 add VUs 1240, 1241, 1258, 1259
GH284 add VUs 1238, 1244
GH284 add 1271 1272 1273 1274 1279 1281 1746 1747 remove 1238 1244 1262 1269
GH284 add 1227 1228 1245 1246
GH284 fix validation test MiscImageLayerTests for VU 1269/1747 swap
GH284 update database with new VU checks
GH284 redo VUs 1227 1246, move them into core validation
GH284 final checks and tests
GH284 fix a rebase merge error
GH284 fix uint64 format specifier that broke the Android build

Change-Id: I5b69eddab945fb09d4cf3645349fa45a61576355

7 years agolayers: Updated changed subroutines for style
Mark Lobodzinski [Wed, 15 Feb 2017 16:31:53 +0000 (09:31 -0700)]
layers: Updated changed subroutines for style

Change-Id: Idda8fd88bc63ba9d441b6fe4854b98e25eede279

7 years agolayers: GH1478, Add error msg for CB invalidation
Mark Lobodzinski [Tue, 14 Feb 2017 20:08:15 +0000 (13:08 -0700)]
layers: GH1478, Add error msg for CB invalidation

Previously, any command buffer not in a recording state would emit
an error message indication that BeginCommandBuffer had not been
called. Added a separate message for command buffers that were
invalidated.
  - Combined ValidateCMD and report_error_no_cb_begin
  - For invalidated CBs, output cause of invalidation
  - Updated test for improved error text

Change-Id: Ie72fb0ec039fbd6d4471ba32c75cc540e5c871d3

7 years agolayers: Fix CB status checks in bindVtx/IndexBuffer
Mark Lobodzinski [Tue, 14 Feb 2017 20:17:35 +0000 (13:17 -0700)]
layers: Fix CB status checks in bindVtx/IndexBuffer

These calls were calling the wrong validate function if a CB_NODE
was not found. Fixed this and added appropriate calls to check the
CB recording state.

Change-Id: I8f22f5bca7233fc92b0b91f3aceb8c38b312dc8f

7 years agodemos: Support cube on iOS and macOS via MoltenVK
Bill Hollings [Wed, 15 Feb 2017 03:58:56 +0000 (22:58 -0500)]
demos: Support cube on iOS and macOS via MoltenVK

7 years agolayers: Fix a few parameter validation holes
Mark Lobodzinski [Tue, 14 Feb 2017 21:30:08 +0000 (14:30 -0700)]
layers: Fix a few parameter validation holes

Added a few missing checks for validation return codes.

Change-Id: Ia6a3a3fbf702ebb982d4f4d26510f3f8fdcf2710

7 years agoheaders: Fix vulkan.hpp clang compiler errors
Mark Lobodzinski [Tue, 14 Feb 2017 23:09:03 +0000 (16:09 -0700)]
headers: Fix vulkan.hpp clang compiler errors

Change-Id: Ibca9f31b722945f1d96fb41aca0f1e78bd6567f1

7 years agolayers: commented SetMemBinding and ValidateSetMemBinding
Cort Stratton [Tue, 14 Feb 2017 20:11:18 +0000 (12:11 -0800)]
layers: commented SetMemBinding and ValidateSetMemBinding

7 years agolayers: Refactored SetMemBinding() for pre/post calls
Cort Stratton [Mon, 13 Feb 2017 22:11:50 +0000 (14:11 -0800)]
layers: Refactored SetMemBinding() for pre/post calls

7 years agolayers: refactor BindBufferMemory for pre/postcall style
Cort Stratton [Mon, 6 Feb 2017 23:30:33 +0000 (15:30 -0800)]
layers: refactor BindBufferMemory for pre/postcall style

7 years agolayers: Add trailing "()" to vkBind*Memory strings
Cort Stratton [Sat, 4 Feb 2017 21:43:39 +0000 (13:43 -0800)]
layers: Add trailing "()" to vkBind*Memory strings

7 years agotests: Add VU 797,806 to BindInvalidMemory
Cort Stratton [Sat, 28 Jan 2017 21:33:10 +0000 (13:33 -0800)]
tests: Add VU 797,806 to BindInvalidMemory

7 years agotests: Add VU 793,805 to BindInvalidMemory
Cort [Sat, 28 Jan 2017 02:34:50 +0000 (18:34 -0800)]
tests: Add VU 793,805 to BindInvalidMemory

7 years agolayers: Add VU error 805,793 (bind mem w/bad memoryOffset)
Cort Stratton [Sat, 28 Jan 2017 22:17:47 +0000 (14:17 -0800)]
layers: Add VU error 805,793 (bind mem w/bad memoryOffset)

7 years agotests: Add VU 792,804 to BindInvalidMemory
Cort Stratton [Sat, 28 Jan 2017 22:17:04 +0000 (14:17 -0800)]
tests: Add VU 792,804 to BindInvalidMemory

7 years agotests: Add VU 791,803 to BindInvalidMemory
Cort Stratton [Sat, 28 Jan 2017 22:16:16 +0000 (14:16 -0800)]
tests: Add VU 791,803 to BindInvalidMemory

7 years agotests: Add VU 800 to BindInvalidMemory
Cort [Wed, 18 Jan 2017 02:10:21 +0000 (18:10 -0800)]
tests: Add VU 800 to BindInvalidMemory

7 years agolayers: Add VU 791,803 (bind mem w/existing binding)
Cort [Wed, 18 Jan 2017 02:09:09 +0000 (18:09 -0800)]
layers: Add VU 791,803 (bind mem w/existing binding)

7 years agolayers: Add VU 792,804 (bind mem to sparse image/buffer)
Cort [Wed, 18 Jan 2017 01:32:33 +0000 (17:32 -0800)]
layers: Add VU 792,804 (bind mem to sparse image/buffer)

7 years agolayers: Refactor BindImageMem for pre/postcall style
Cort Stratton [Sat, 28 Jan 2017 22:14:06 +0000 (14:14 -0800)]
layers: Refactor BindImageMem for pre/postcall style

Change-Id: I40d5e8566a7e72a72e59ad07de01c51f10cd5bea

7 years agolayers: Update BindImageMemory var names for style
Mark Lobodzinski [Wed, 23 Nov 2016 17:18:53 +0000 (10:18 -0700)]
layers: Update BindImageMemory var names for style

Change-Id: I38fa79b4c696b3d986558cd885156004ad082468

7 years agoheader: Update to Vulkan 1.0.40
Mark Lobodzinski [Mon, 13 Feb 2017 17:15:53 +0000 (10:15 -0700)]
header: Update to Vulkan 1.0.40

    fixed:
       - generators for latex math changes
    updated:
       - include/vulkan/vk_platform.h
       - include/vulkan/vulkan.h
       - scripts/generator.py
       - scripts/lvl_genvk.py
       - scripts/reg.py
       - scripts/vk.xml
       - include/vulkan/vulkan.hpp
       - layers/tests json files
       - loader SOVERSION

Change-Id: Id7d6f9dee73888877f2e7528f5701871f54ece79

7 years agoscripts: Add copy of cgenerator.py to LVL repo
Mark Lobodzinski [Mon, 13 Feb 2017 17:33:08 +0000 (10:33 -0700)]
scripts: Add copy of cgenerator.py to LVL repo

This will be needed for genvk.py updates.

Change-Id: I48e28b3051b367cb883d86f7fc5b217cadecb495

7 years agolayers: Remove predefined threading object lists
Mark Lobodzinski [Tue, 14 Feb 2017 16:16:56 +0000 (09:16 -0700)]
layers: Remove predefined threading object lists

These lists were hard-coded in the generator. Added on-the-fly
detection of handles to reduce maintenance.

Change-Id: I8a897da731d96c2f70f00e479a17c355f03a7486

7 years agoLayers: Add KHR/KHX/NN extensions to threading layer
Mark Lobodzinski [Fri, 10 Feb 2017 15:34:54 +0000 (08:34 -0700)]
Layers: Add KHR/KHX/NN extensions to threading layer

These were skipped due to problems in codegen. Added support for new
objects into the layer, fixed codegen.

Change-Id: Iaf4fcaa229664f7d3118da4db35649fbdf36e2eb

7 years agodocs: Update LoaderAndLayerInterface
Mark Young [Mon, 13 Feb 2017 22:39:22 +0000 (15:39 -0700)]
docs: Update LoaderAndLayerInterface

Added section detailing the loader's instance extension name
filtering behavior and the environment varaible that can be used
to disable the behavior.

Change-Id: Iadbde47e2933a163906a7cfa1c4b340da0d73789

7 years agotests: Implement test for VU 2116 check
Mike Weiblen [Tue, 7 Feb 2017 02:21:52 +0000 (19:21 -0700)]
tests: Implement test for VU 2116 check

Add test 'PipelineRenderpassCompatibility' to exercise VU 2116 check.

Bump copyright year.

Update database test name.

Change-Id: I4eb73232e69874f34502d25867d2aa60c17f6a13

7 years agolayers: Add VU 2116 pColorBlendState checking GH-777
Mike Weiblen [Thu, 9 Feb 2017 19:13:24 +0000 (12:13 -0700)]
layers: Add VU 2116 pColorBlendState checking GH-777

Add Valid Usage 02116 check.
If the rasterizerDiscardEnable member of pRasterizationState is
VK_FALSE, and subpass uses color attachments, pColorBlendState must be
a pointer to a valid VkPipelineColorBlendStateCreateInfo structure.

Update VU database check_implemented flag.

Change-Id: I154321e3a891a61c0917ec8a9520ae766162e2e6

7 years agolayers: Refactor checking code
Mike Weiblen [Thu, 9 Feb 2017 19:26:58 +0000 (12:26 -0700)]
layers: Refactor checking code

Combine code blocks to avoid repetitive checking of the same state.

Change-Id: I788538b82ce9420035d9ab2ba9fefb9befb67722

7 years agoClang-format for recent QueueSubmit commits
Tony Barbour [Wed, 8 Feb 2017 20:53:39 +0000 (13:53 -0700)]
Clang-format for recent QueueSubmit commits

Change-Id: Id029c12d36b6327ac73c43879f315513c71b13d1

7 years agolayers: Separate validation from state in QueueSubmit
Tony Barbour [Wed, 25 Jan 2017 19:53:48 +0000 (12:53 -0700)]
layers: Separate validation from state in QueueSubmit

Change-Id: I95878805bfc025afd60ba2167aeb78dba064b56e

layers: Rework semaphore signal tracking in QueueSubmit

Change-Id: I6ee12fd44ebd42c1a4e14bb7fd0eae300489d413

layers: Better submit count tracking in QueueSubmit

Change-Id: I90065fc4546354cb2be14be9143356132ac2f3df

layers: Improve image layout tracking in QueueSubmit

Change-Id: I6e10c8a6d18730939dfa0a5d5e452a23c540f94e

layers: Move cmd collection from validate to record

Change-Id: I89df7358f1916ea4688d4b8cfe2cb870f946b3d9

layers: Fix command buffer submit count in QueueSubmit

Use vector and count instead of unordered_map

Change-Id: I227951085af7df0c288cb3563d17a04d7f2f41e1

7 years agolayers: Refactor CmdFillBuffer
Mark Lobodzinski [Fri, 10 Feb 2017 21:01:27 +0000 (14:01 -0700)]
layers: Refactor CmdFillBuffer

Separated validation from state updates, refactored for pre/post
and moved these functions out of core_validation. Also updated for
coding style.

Change-Id: I9b24bc8c951fd1df99a65db5fa8f1d0412488192

7 years agolayers: Move destroybuffer/bufferview out of CV
Mark Lobodzinski [Fri, 10 Feb 2017 20:48:38 +0000 (13:48 -0700)]
layers: Move destroybuffer/bufferview out of CV

Moved pre/post routines to buffer module, along with a couple of
functions.

Change-Id: Ibb67bf18ed376a37666f171c4e30676fa18157ca

7 years agoloader: Fix XDG path parsing
Karl Schultz [Sun, 12 Feb 2017 19:34:03 +0000 (12:34 -0700)]
loader: Fix XDG path parsing

Fixes #1474

Fix path parsing code to handle leading and trailing
path separators.  Also handle contiguous path separators.
When encountering something like ::: in the path, the old
code would add multiple entries containing only the
relative part of the path (e.g., /vulkan.icd.d).

7 years agolayers: Change mem map error to warning
Michael Lentine [Fri, 10 Feb 2017 20:57:15 +0000 (14:57 -0600)]
layers: Change mem map error to warning

Currently the spec allows memory to be mapped regardless of format.
However, because the memory cannot be used by the device in a predicable
way unless the format is PREINITIALIZED or GENERAL we still need a
warning here.

Change-Id: Ie50b21c0840d97409e40d7f9187f34b9552050f2

7 years agolayers: Fix CheckPreserved to allow input attachment
Tony Barbour [Fri, 10 Feb 2017 20:41:15 +0000 (13:41 -0700)]
layers: Fix CheckPreserved to allow input attachment

Attachments that are used (input / color / depth attachment)
in a subpass are not allowed in the preserved list, so if they
are used as a color, depth  or input attachment they should
be consided preserved.  Color and depth attachments were accounted
for, this commit adds input attachment

Change-Id: Id87c3c1546092bc64b293bead1d997e0f61f7990