platform/upstream/Vulkan-Tools.git
7 years agolayers: Plumb through image_state structures
Mark Lobodzinski [Thu, 2 Feb 2017 15:31:18 +0000 (08:31 -0700)]
layers: Plumb through image_state structures

Saved some lookups by sending down state instead of images in the
image validation helper functions.

Change-Id: I2b21218596b8e980d4f55451a5feccdb2dac6360

7 years agolayers: Move ClearDepthStencilImage val out of CV
Mark Lobodzinski [Wed, 1 Feb 2017 17:57:21 +0000 (10:57 -0700)]
layers: Move ClearDepthStencilImage val out of CV

Moved this image layer validation into the existing routines in the
buffer_validation module.

Change-Id: If809b5ef484fccdd2d9715adc06c5e439b0b8942

7 years agolayers: Move image validation support to buffer_val
Mark Lobodzinski [Wed, 1 Feb 2017 16:03:06 +0000 (09:03 -0700)]
layers: Move image validation support to buffer_val

Moved the new CmdClear[Color/DepthStencil]Image support routines
to the buffer_validation module, along with some related helper
functions.

Change-Id: I76a4b545e696bbc770ef0c672d14c92e4a941e49

7 years agoloader: Minor language clarification, fix markup
Jeff Juliano [Tue, 31 Jan 2017 21:36:18 +0000 (16:36 -0500)]
loader: Minor language clarification, fix markup

7 years agolayers:Move gfx pipe check to create time
Tobin Ehlis [Wed, 1 Feb 2017 20:31:22 +0000 (13:31 -0700)]
layers:Move gfx pipe check to create time

Fixes #1424

The check to verify that the attachmentCount for blend state of a
Graphics Pipeline matches the attachmentCount for the given subpass of
the creation renderPass was occurring at draw time but can and should
be done at Gfx Pipeline creation time.

This change moves the check to creation time and updates the database
and test appropriately.

7 years agodemos: Add XInitThreads to xlib path of cubes
Tony Barbour [Tue, 31 Jan 2017 23:09:58 +0000 (16:09 -0700)]
demos: Add XInitThreads to xlib path of cubes

Change-Id: Idb2991972bdd91c3e48ad5d796de4b31d7138c98

7 years agolayers: Refactor ClearColor/DSImage for pre/post
Mark Lobodzinski [Tue, 31 Jan 2017 22:24:47 +0000 (15:24 -0700)]
layers: Refactor ClearColor/DSImage for pre/post

Change-Id: Id055c26ca0ecb5012f96a7e8f474d598d6b46dfd

7 years agolayers: Split validation/state updates for clears
Mark Lobodzinski [Tue, 31 Jan 2017 22:11:38 +0000 (15:11 -0700)]
layers: Split validation/state updates for clears

CmdClearColorImage and CmdClearDepthStencilImage routines mixed
validation and state updates.  Separated these and made the state
updates conditional on passing validation.

Change-Id: Ib710e91a038f7a0307d30218a49db1bf49bb8187

7 years agolayers: Fix var names in CmdClear[C|DS]image
Mark Lobodzinski [Tue, 31 Jan 2017 21:57:03 +0000 (14:57 -0700)]
layers: Fix var names in CmdClear[C|DS]image

Change-Id: I3206d734401cb162b219ed9d0a169786a3b5c4c4

7 years agolayers: Fix var names for ClearImageLayout funcs
Mark Lobodzinski [Tue, 31 Jan 2017 21:54:24 +0000 (14:54 -0700)]
layers: Fix var names for ClearImageLayout funcs

Change-Id: I66c42d591d70b816788cb1ab457d8d674fb5cbe5

7 years agolayers: Split VerifyClearImageLayout routine
Mark Lobodzinski [Tue, 31 Jan 2017 21:48:54 +0000 (14:48 -0700)]
layers: Split VerifyClearImageLayout routine

This routine mixed validation checks and state updates. Split into
two routines: Validation is in VerifyClearImageLayout while state
updates are now in RecordClearImageLayout.

Change-Id: Ib6c943c0df16a9bdbcc7c44c775f371b56bbcbb2

7 years agodocs: Update build dependencies
Rene Lindsay [Fri, 27 Jan 2017 18:32:17 +0000 (11:32 -0700)]
docs: Update build dependencies

libx11-xcb-dev is used by WSI-Window.
libx11-xcb-dev depends on libx11-dev and libxcb1-dev.
So, installing libx11-xcb-dev will install all three.

Change-Id: Id3909919bbd48794df2fcad10b67ea3f8dbb203f

7 years agolayers: Rename misleading renderpass structure var
Mark Lobodzinski [Tue, 31 Jan 2017 20:20:50 +0000 (13:20 -0700)]
layers: Rename misleading renderpass structure var

Renderpass state structure was called 'renderPass' leading to some
confusion and errors.

Change-Id: I9c0d301fc41cebff6a1eadc99ee2d2d30d11beb1

7 years agolayers: GH1390, Fix BeginRenderPass validation msg
Mark Lobodzinski [Tue, 31 Jan 2017 18:10:38 +0000 (11:10 -0700)]
layers: GH1390, Fix BeginRenderPass validation msg

Incorrect index was printed in validation warning. Clarified message.

Change-Id: I77806a5fa5da25e966b009126d7a0db7a47a3908

7 years agolayers: GH1390, Fix renderpass handle output
Mark Lobodzinski [Tue, 31 Jan 2017 17:55:50 +0000 (10:55 -0700)]
layers: GH1390, Fix renderpass handle output

The CV CmdBeginRenderPass validation was using the incorrect variable
to output the renderpass handle in error messages.

Change-Id: I902a04ba7009557257732e0ff65d98aa93f88f31

7 years agolayers: Add tests for sparse images
Dave Houlton [Tue, 24 Jan 2017 22:09:17 +0000 (15:09 -0700)]
layers: Add tests for sparse images

Add two tests to verify the checks added around sparse residency
images.

Change-Id: Iedd56acecb34c26f367a099ca6acbea8f6e4dedf

7 years agolayers: Add sparse image tiling check - GH283
Dave Houlton [Mon, 23 Jan 2017 23:37:04 +0000 (16:37 -0700)]
layers: Add sparse image tiling check - GH283

Fixed the missing sparse residency with linear tiling check from
GitHub issue #283. Also added 6 related valid usage checks from the
database.

Change-Id: I357e63ee0e6e4787e1aeea67756906e591ba8187

7 years agocube: Add direct to display support
Damien Leone [Tue, 31 Jan 2017 17:26:07 +0000 (10:26 -0700)]
cube: Add direct to display support

Although this extension is platform agnostic, this commit only enables
it on Linux because this is the only platform I am able to test.

Direct to display is enabled by passing '-DDEMOS_WSI_SELECTION=DISPLAY'
to cmake.

Change-Id: I5f23019d4b0c87104e1f834d3a6901850bfda7a3

7 years agovulkaninfo: Kill printed whitespace
Mark Lobodzinski [Tue, 31 Jan 2017 17:34:28 +0000 (10:34 -0700)]
vulkaninfo: Kill printed whitespace

Change-Id: I1e9d088d744bd1c4745a4c77ea75207f5350bf02

7 years agovulkaninfo: Print human-readable heap sizes
Tobias Markus [Mon, 30 Jan 2017 09:48:00 +0000 (10:48 +0100)]
vulkaninfo: Print human-readable heap sizes

Since the size of a memory heap can be rather substantial, it is helpful
to have the size additionally printed out in a human-readable format,
i.e. using prefixes.

Change-Id: I47aad4fce06471804ce9e853ba300626b6ad34c8

7 years agolayers: Migrate image layer CmdClearColorImage
Mark Lobodzinski [Fri, 27 Jan 2017 22:16:01 +0000 (15:16 -0700)]
layers: Migrate image layer CmdClearColorImage

The image layer checks for this API were moved to the
buffer_validation module and a call was added to CV.

Change-Id: I04b23843519d2354c952afebc3a3428b196339e3

7 years agolayers: Move CreateRenderPass format check to PV
Mark Lobodzinski [Fri, 27 Jan 2017 21:50:23 +0000 (14:50 -0700)]
layers: Move CreateRenderPass format check to PV

Format validation check was in image layer -- removed the API
completely and moved check to parameter_validation. Also updated
to use the VU ID and noted it in the database.

Change-Id: I339925be7615777cfb1214ffe456a2498c676177

7 years agolayers: Update PostCallRecordCreateImage
Mark Lobodzinski [Fri, 27 Jan 2017 21:25:32 +0000 (14:25 -0700)]
layers: Update PostCallRecordCreateImage

Changed to use layer_data accessor functions instead of passing in
items individually.

Change-Id: I55b92a4e0a6fff0e74516b9249c213f7d514cc8e

7 years agolayers: Move DestroyImage code into buffer module
Mark Lobodzinski [Fri, 27 Jan 2017 19:28:30 +0000 (12:28 -0700)]
layers: Move DestroyImage code into buffer module

Moved CHECK_DISABLED into CV_types.h, moved validation and recording
routines into buffer_validation.cpp.

Change-Id: I103d0fc9c2e985d98943471ec6f83898c58bfdfe

7 years agolayers: Fix CreateImage extent validation
Mark Lobodzinski [Fri, 27 Jan 2017 18:13:21 +0000 (11:13 -0700)]
layers: Fix CreateImage extent validation

Spec has changed and no longer allows any member of the extents
structure to be <= zero. Fixed validation and added correct VU ID,
updated test and database.

Change-Id: Ifafedf8cd6d59ecba975ae1b25c9f00d86247504

7 years agolayers: Move CreateImage validation into core_val
Mark Lobodzinski [Thu, 26 Jan 2017 22:23:11 +0000 (15:23 -0700)]
layers: Move CreateImage validation into core_val

Was in Image layer.  Added layer_data accessor functions.

Change-Id: I55b7896cfc9de81210c9fba4d332998c827f5d44

7 years agocmake: GH1428, Reenable subproject builds
Mark Lobodzinski [Tue, 31 Jan 2017 14:35:19 +0000 (07:35 -0700)]
cmake: GH1428, Reenable subproject builds

SCRIPTS dir was defined using CMAKE_SOURCE_DIR which prevented LVL
from building correctly if used as a subproject. Changed to use
CMAKE_CURRENT_SOURCE_DIR.

Change-Id: I201fcfde78b65df80c3c74373a26e4d518770806

7 years agobuild: Enable declaration hiding warning on Windows
Karl Schultz [Fri, 20 Jan 2017 20:19:20 +0000 (13:19 -0700)]
build: Enable declaration hiding warning on Windows

Fixes #1388
Turn on the Windows compiler option (4456) to report
hidden declarations.
Fix all places where this was occurring.

Change-Id: I3346d87da8b70d6299c206fcac68520a091ed1a6

7 years agolayers: Add new module to stats script
Mark Lobodzinski [Fri, 27 Jan 2017 22:34:37 +0000 (15:34 -0700)]
layers: Add new module to stats script

Change-Id: Ic353c7bd1d0c9d067fa52d413b25a87f641c4747

7 years agoexternal: Update glslang/spirv-tools revisions
Mike Weiblen [Fri, 27 Jan 2017 21:03:26 +0000 (14:03 -0700)]
external: Update glslang/spirv-tools revisions

glslang_revision to commit 62c3e400
spirv-tools_revision to commit cb009b38

Change-Id: I44146bc2fca4043013076e9368fcc8cefa6854b4

7 years agolayers: GH-909 level/layer Valid Usage checking
Mike Weiblen [Tue, 24 Jan 2017 20:08:42 +0000 (13:08 -0700)]
layers: GH-909 level/layer Valid Usage checking

Refactor subresourceRange.levelCount and subresourceRange.layerCount
checking from PreCallValidateCreateImageView() into a standalone
helper function ValidateImageSubrangeLevelLayerCounts() to facilitate
reuse below.

Add ValidateImageSubrangeLevelLayerCounts() to ValidateBarrier(), to
address GH-909.

This extends the reuse of Valid Usages 00768 and 00769, which are
already tagged as deserving new standalone Valid Usages.
This change is implemented such that it will be simple to modify for
new VUs, once they're available.

Also canonicalize function names passed as parameter to helper
function.

Change-Id: I8346a19e9b2c4df578334c2aebfb78e6492bd1d9

7 years agolayers: Fix for VkBufferImageCopy for depth/stencil
Marcin Kantoch [Fri, 27 Jan 2017 11:33:21 +0000 (12:33 +0100)]
layers: Fix for VkBufferImageCopy for depth/stencil

According to the Vulkan spec:

"If the the calling command's VkImage parameter's format is not a
depth/stencil format, then VkBufferImageCopy::bufferOffset must be
a multiple of the format's element size"

Currently the image validation layer is checking unconditionally if
VkBufferImageCopy::bufferOffset is a multiple of the format's
element size and reporting error otherwise.

Added code that skips the alignment check if the VkImage parameter's
format is combined depth/stencil.

Change-Id: I92f2a67eee590fa3616df9da121aceec65204c24

7 years agorepo: Clang-format LVL source files using Google
Mark Lobodzinski [Thu, 26 Jan 2017 20:34:13 +0000 (13:34 -0700)]
repo: Clang-format LVL source files using Google

Switch clang-format standard from the LLVM style to the
Google style for more consistency.

Change-Id: I247c4abc275d7873a91522e1e234198adaa24033

7 years agorepo: Change source style from LLVM to Google
Mark Lobodzinski [Thu, 26 Jan 2017 20:30:26 +0000 (13:30 -0700)]
repo: Change source style from LLVM to Google

Matches the source code style guide.

Change-Id: I9a1328ce8b500fa34336b52964dcb2c7fd16e17b

7 years agorepo: Clang-format c/cpp/h LVL files using LLVM
Mark Lobodzinski [Thu, 26 Jan 2017 19:16:30 +0000 (12:16 -0700)]
repo: Clang-format c/cpp/h LVL files using LLVM

Bring all source files in the repo up to date with consistent
coding style/standard.

Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23

7 years agorepo: Update root .clang-format file
Mark Lobodzinski [Wed, 25 Jan 2017 16:25:29 +0000 (09:25 -0700)]
repo: Update root .clang-format file

Change-Id: Id47dc032bd82c096263531c8a3ec9237d6ef8d79

7 years agoloader: Protect loader macro lists from clang-format
Mark Lobodzinski [Thu, 26 Jan 2017 19:22:32 +0000 (12:22 -0700)]
loader: Protect loader macro lists from clang-format

Change-Id: I3e943a538d33737453a3e71edebbd026a1c7f6f3

7 years agorepo: Remove subordinate .clang-format files
Mark Lobodzinski [Wed, 25 Jan 2017 16:23:04 +0000 (09:23 -0700)]
repo: Remove subordinate .clang-format files

Change-Id: I64e05b33dd830e5d2c6e7ed4c5e8a292692eae39

7 years agobuild: Turn on "treat warnings as errors" on Win
Karl Schultz [Tue, 24 Jan 2017 22:44:26 +0000 (14:44 -0800)]
build: Turn on "treat warnings as errors" on Win

Also address compiler warnings:

- Suppress warnings for inconsistently redefined snprintf
  on Windows with Visual Studio < 2015.  Warnings for
  preprocessor redefinitions are still enabled on VS 2015
  because snprintf is not redefined on VS 2015.

- Turn off "changed behavior" warning with Visual Studio < 2015
  for using initializers in constructors.  MSFT "fixed" some
  forms of these initializers so that they clear members instead
  of just leaving them alone.  Since clearing is usually desired,
  this isn't a problem in most cases.  But if an object is
  reinstantiated on top of an existing object, via placement new
  for example, the clearing may not be desired if the first object's
  data was meant to be preserved.  We don't count on this behavior.

- Suppress linker warning for linking the loader in debug build on
  Windows.  This warning is for mismatched runtime libraries and
  causes extra code to be linked in only for debug builds.  Ignoring
  the warning is generally regarded as better than the alternatives.

Change-Id: I8b0e311d3c80a8dd9ac0cc95f764ed1123efa86f

7 years agolayers: Disable clang-format for gen'd header
Mark Lobodzinski [Wed, 25 Jan 2017 16:33:25 +0000 (09:33 -0700)]
layers: Disable clang-format for gen'd header

The vk_validation_error_messages.h header file now disables
clang-format, as it is generated in-source.

Change-Id: Ie9abf005c79b67cdb5843025ce19091d23fe1bec

7 years agoscripts:Unique error enum update for 1/25/2017
Tobin Ehlis [Wed, 25 Jan 2017 20:42:55 +0000 (12:42 -0800)]
scripts:Unique error enum update for 1/25/2017

Hadn't had a spec update in quite a while so this one was huge.
Also the format of the spec itself changed which required a number of
changes to the spec parser. The spec script is still broken for the
online spec which is not valid xhtml. For this update I downloaded the
spec source and hand-edited the broken parts so that the spec parser
could deal with it. Will figure out a better solution going forward,
though.

Here's the beast of a command line for this update:
python spec.py -spec test_xhtml_spec_039.html -update -remap 214-180,3:\
269-220,3:361-289:371-299:373-301:409-334,10:470-404,12:483-416,6:\
768-625,10:948-754,2:951-756,4:970-760,8:979-769:989-778,4:1031-812,16:\
1048-828,16:1158-936:1160-937,10:1171-947,12:1189-965:1190-966,2:\
1192-968:1251-1027,33:1371-1141:1408-1175,3:1412-1178:1414-1179,2:\
1417-1181:1419-1182,15:1435-1198,2:1627-1343,7:1646-1359,2:1668-1366,2:\
1720-1383:1783-1395:1871-1449:1878-1455,16:1977-1554,5:2012-1565,9:\
1992-1559,4:1997-1563,2:2202-1615:2222-1635,2:1047-1741:2313-1844,7:\
2361-1878,5:2370-1883,6:956-2161,13:1650-2201:1672-2214:1696-2229,2:\
1729-2249,2:1759-2267,2:1793-2288,2:1982-2304,6:1990-2313:1999-2314,13:\
2366-2327,4:1159-2348:968-2524:1413-2533:1418-2534:983-772,4:2512-1680:\
2587-2040:1996-2547:1170-2525:969-2173

7 years agolayers: Add new exts to unique_objects whitelist
Lenny Komow [Wed, 25 Jan 2017 20:35:01 +0000 (13:35 -0700)]
layers: Add new exts to unique_objects whitelist

Change-Id: Ia61c79833ed3b6e37402406631a50c746f312928

7 years agodemos: Protect smoke demo data file from c-f
Mark Lobodzinski [Wed, 25 Jan 2017 17:11:50 +0000 (10:11 -0700)]
demos: Protect smoke demo data file from c-f

Clang formatting the teapot mesh data file makes it unnecessarily
lengthy -- disabled for the data definition portion of the file.

Change-Id: I773fc4655b381b26a33e32fe845514f36b9d8e66

7 years agolayers: Protect format table from autoformatting
Mark Lobodzinski [Wed, 25 Jan 2017 17:01:11 +0000 (10:01 -0700)]
layers: Protect format table from autoformatting

Change-Id: I0dbb2ab1c8f8179fe3d1fe575258051e56104f7d

7 years agolayers: Make uniqueobjects header clang-format proof
Mark Lobodzinski [Wed, 25 Jan 2017 16:56:02 +0000 (09:56 -0700)]
layers: Make uniqueobjects header clang-format proof

Change-Id: I779ed9c2c1d9c7d8d0fcfec4dd89d95c14ee1401

7 years agodocs: Update contributing doc
Mark Lobodzinski [Wed, 25 Jan 2017 14:56:21 +0000 (07:56 -0700)]
docs: Update contributing doc

Change-Id: I3ead4ff33591c55312eab9b6a6b515d0453ab796

7 years agoloader: Fix EnumPhysDev bug
Mark Young [Tue, 24 Jan 2017 22:54:29 +0000 (15:54 -0700)]
loader: Fix EnumPhysDev bug

Fix a bug found by Piers with regards to vkEnumeratePhysicalDevices.
Basically, if the application called the function without first
calling it with NULL pPhysicalDevices, the count would be wrong.

Change-Id: If3a4ba60b17c64df2133d31d3692ee6da21c6a01

7 years agoSuppress VC++ 2017 signed/unsigned warning
Bruce Dawson [Tue, 24 Jan 2017 05:48:04 +0000 (21:48 -0800)]
Suppress VC++ 2017 signed/unsigned warning

When building Chrome with VC++ 2017 there is one warning, from passing
an int to a call to std::vector<uint32_t>::find. This change adds a cast
to avoid that warning, thus fixing issue #1395.

7 years agobuild: Update travis for xrandr dependency
Lenny Komow [Tue, 24 Jan 2017 21:49:45 +0000 (14:49 -0700)]
build: Update travis for xrandr dependency

Change-Id: I16f8e6a423ce1af305429f4c175da781139d0cb6

7 years agoloader: Update the loader to 1.0.39
Mark Young [Fri, 20 Jan 2017 04:10:49 +0000 (21:10 -0700)]
loader: Update the loader to 1.0.39

Add new extensions for 1.0.39.  Also, updated layers to include
minimal set of functionality for 1.0.39 extensions. Extensions include:
 - VK_KHR_get_physical_device_properties2
 - VK_KHR_shader_draw_parameters
 - VK_EXT_direct_mode_display
 - VK_EXT_display_surface_counter
 - VK_EXT_display_control

Also, redo the LoaderAndLayerIf document.

Change-Id: I10412086da7a798afe832a3892e18f606259b5af

7 years agolayers: Fixup cmake for new generated file deps
Mark Lobodzinski [Mon, 23 Jan 2017 16:57:36 +0000 (09:57 -0700)]
layers: Fixup cmake for new generated file deps

Change-Id: I9b5d9de6689da31907edc9ca547ae57dddee94cc

7 years agocmake: Add common targets/rules for helper files
Mark Lobodzinski [Mon, 23 Jan 2017 16:08:20 +0000 (09:08 -0700)]
cmake: Add common targets/rules for helper files

Change-Id: I26244eaf04451fd7c3755563953c7b8ad3715613

7 years agocmake: Move common xml-gen macro to root file
Mark Lobodzinski [Mon, 23 Jan 2017 15:51:08 +0000 (08:51 -0700)]
cmake: Move common xml-gen macro to root file

We had several copies of this macro across the repos -- moved it to
the top-level cmake file for sharing.

Change-Id: I33a97ecb24ad8c7cc6826c1a431f668fa2bec41f

7 years agoexternal: Update glslang/spirv-tools revisions
Mike Weiblen [Fri, 20 Jan 2017 18:53:07 +0000 (11:53 -0700)]
external: Update glslang/spirv-tools revisions

glslang_revision to commit 22f25d80c6
spirv-tools_revision to commit 9c71c572e5

Change-Id: Ia08b18315755c421772f0db5b503bf7a166bb3ce

7 years agolayers:Synch validation updates
Tobin Ehlis [Thu, 19 Jan 2017 19:05:27 +0000 (12:05 -0700)]
layers:Synch validation updates

I started scrubbing the valid usage blocks for synch validation and
made a few different updates here.
Added a missing unique error id and a comment for another.
Got a bit sidetracked and decided to implement a check for all
stageMasks to make sure that they don't set geometry shader or
tessellation shader bits if those featurse aren't enabled.

Added a test to verify new check and made a bunch of updates to the
database file.

7 years agocontrib: Update style guide and add Git rules
Jeremy Hayes [Thu, 19 Jan 2017 21:10:18 +0000 (14:10 -0700)]
contrib: Update style guide and add Git rules

Change-Id: I968e503c0c9c107d5e4496e54f68e0e57563fec2

7 years agotests: Add checks for ClearAttachment validation
Mark Lobodzinski [Wed, 18 Jan 2017 22:44:53 +0000 (15:44 -0700)]
tests: Add checks for ClearAttachment validation

Renamed existing test, added new test cases and updated the
validation error database with the test names.

Change-Id: Ie0600f2ad8b1fa0851479b91a555622bbe1075b9

7 years agolayers: Refactor ClearAttachments to pre/post form
Mark Lobodzinski [Wed, 18 Jan 2017 22:14:29 +0000 (15:14 -0700)]
layers: Refactor ClearAttachments to pre/post form

Change-Id: Ica1bf93ddcd7eb0c2e83171ba5e56df382571677

7 years agolayers: Fixup ClearAttachments variable names
Mark Lobodzinski [Wed, 18 Jan 2017 21:55:58 +0000 (14:55 -0700)]
layers: Fixup ClearAttachments variable names

Change-Id: Ia6ea0fa3df94fe433d5a166f6e5d2cfa38efec68

7 years agolayers: Remove redundant CV ClearAttachments check
Mark Lobodzinski [Wed, 18 Jan 2017 21:52:22 +0000 (14:52 -0700)]
layers: Remove redundant CV ClearAttachments check

This check was incorrectly labeled, and the actual check is present
in the image layer.

Change-Id: I29b866eb9da731e0996b95da3052b4878e906602

7 years agolayers: GH398, CmdClearAttachments validation
Mark Lobodzinski [Thu, 12 Jan 2017 18:14:35 +0000 (11:14 -0700)]
layers: GH398, CmdClearAttachments validation

Change-Id: I69aa3613db700f736393b35322bc383620b1d4e0

7 years agoVulkaninfo: Vulkaninfo crashes when DISPLAY is invalid
Arda Coskunses [Thu, 19 Jan 2017 17:41:27 +0000 (10:41 -0700)]
Vulkaninfo: Vulkaninfo crashes when DISPLAY is invalid

On Linux the following command crashes:
DISPLAY=foobar ./vulkaninfo

This patch fixes this issue.
https://github.com/LunarG/VulkanTools/issues/125

Change-Id: Ibb8d7b8b6cb4dc730aab9f5b4311e744c903029b

7 years agolayers: GH1355, Fix bad swapchain image accesses
Thomas Louis [Tue, 10 Jan 2017 23:17:08 +0000 (00:17 +0100)]
layers: GH1355, Fix bad swapchain image accesses

vkAcquireNextImageKHR throws Access Violation Exception. Added a new
error enum value and created an error check in vkAcquireNextImageKHR
to avoid index out of bounds exception (thrown in core_validation)
within the application.

Change-Id: Ie7fe2d3830e26c21b09290054cc39bc55e534cbc

7 years agodocs: Update runtime installer license copyright
Lenny Komow [Wed, 18 Jan 2017 23:04:12 +0000 (16:04 -0700)]
docs: Update runtime installer license copyright

Change-Id: I41e6cdeb573754cebbf9c38cffc8be7a7c196591

7 years agoscripts: GH1383, Fix Dota2 issue with safe_structs
Mark Lobodzinski [Wed, 18 Jan 2017 18:05:48 +0000 (11:05 -0700)]
scripts: GH1383, Fix Dota2 issue with safe_structs

Change-Id: I158a86639ec802e47f3a87a95af8cf20d1cffbf5

7 years agolayers: Fixup CreateImage paramter list
Mark Lobodzinski [Tue, 17 Jan 2017 23:24:29 +0000 (16:24 -0700)]
layers: Fixup CreateImage paramter list

Change-Id: Idfcc569d3985a4ff31503535af9c8329c6304f6a

7 years agolayers: Move CreateImage recording to buf/img module
Mark Lobodzinski [Wed, 11 Jan 2017 18:36:16 +0000 (11:36 -0700)]
layers: Move CreateImage recording to buf/img module

- Move source from core_validation.cpp into new module
- Add new module to layers cmake file
- Update android build scripts/makefiles for new files

Change-Id: Ia4000b26384d96a551d727f5e37997372f01764a

7 years agolayers: Move image struct into cv_types header
Mark Lobodzinski [Tue, 17 Jan 2017 16:14:36 +0000 (09:14 -0700)]
layers: Move image struct into cv_types header

To allow external access to image_state structs.

Change-Id: I3af02068c81b32df68b56c4e210cb2a5b2000efa

7 years agolayers: Add physical device props init to CV
Mark Lobodzinski [Wed, 11 Jan 2017 16:34:01 +0000 (09:34 -0700)]
layers: Add physical device props init to CV

Image layer checks need limits/caps.

Change-Id: Ib01d194e57563e327ce15846a7a384d78929ebc4

7 years agolayers: Add error message header to CV header
Mark Lobodzinski [Tue, 17 Jan 2017 20:09:40 +0000 (13:09 -0700)]
layers: Add error message header to CV header

Was working due to coincidental include so made explicit.

Change-Id: I6cd580c8a5e643ed19d3950c33012c5c42c12e14

7 years agolayers: Create buffer/image validation module
Mark Lobodzinski [Tue, 17 Jan 2017 21:14:22 +0000 (14:14 -0700)]
layers: Create buffer/image validation module

As image layer is folded into CV, image- and buffer-related
checks will reside in these modules.

Change-Id: Id261cc0d40eaa51211c36bb1fa82d0cbbaf1a6f5

7 years agolayers: PR1381, Fix vkCmdCopyImage intersection check
Alex Smith [Tue, 17 Jan 2017 11:13:23 +0000 (11:13 +0000)]
layers: PR1381, Fix vkCmdCopyImage intersection check

RegionIntersects would return true if the source and destination array
layers and mip level did *not* overlap, resulting in a spurious
validation error when trying to copy between different array layers or
mip levels of the same image.

Change-Id: I2e5675f703a4f5e2e7cbfd1d038bd38c7d7dafe0

7 years agowinsdk: Fix RT not reading versions from registry
Lenny Komow [Mon, 16 Jan 2017 17:10:47 +0000 (10:10 -0700)]
winsdk: Fix RT not reading versions from registry

Change-Id: I44bb8c167492739467448925375ae1b99fb8a2db

7 years agoloader: Fix static analysis warnings
Karl Schultz [Fri, 13 Jan 2017 21:01:35 +0000 (14:01 -0700)]
loader: Fix static analysis warnings

Handle possible null pointer dereferences.
Misc other warnings, nothing too serious.
Not addressing alloca concerns yet.

Change-Id: I712a6b4996a4d900604867e373521ff4d1c53df5

7 years agoloader: Improve loader logging
Mark Young [Fri, 13 Jan 2017 17:27:03 +0000 (10:27 -0700)]
loader: Improve loader logging

Clean up some more logging strings with extra spaces.  Also,
updated the command-line output of the VK_LOADER_DEBUG messages
so that they clearly indicate what type of log message is being
outputted: INFO, WARNING, ERROR, PERF, and DEBUG.

Change-Id: I8cbb5b058094febdccf912eb595f5b4f01c3485b

7 years agowinsdk: Allow Configuring layers for older SDKs
Lenny Komow [Fri, 13 Jan 2017 21:20:57 +0000 (14:20 -0700)]
winsdk: Allow Configuring layers for older SDKs

Change-Id: I9b13d7c43ee159f935d289ea939ac3c2c1e54875

7 years agodemos: Add uniform buffer per swapchain image to cube
Tony Barbour [Wed, 11 Jan 2017 20:35:09 +0000 (13:35 -0700)]
demos: Add uniform buffer per swapchain image to cube

Change-Id: I290ed2a8f72303c58a52cace3c9d640cb3264def

7 years agodemos: Cube quit ignoring NULL fence errors
Tony Barbour [Fri, 6 Jan 2017 22:56:39 +0000 (15:56 -0700)]
demos: Cube quit ignoring NULL fence errors

Change-Id: I2cc5c49b53a19716096ac912120286f03f7d6f91

7 years agodemos: Cube updated to use triple buffering
Tony Barbour [Fri, 6 Jan 2017 22:54:22 +0000 (15:54 -0700)]
demos: Cube updated to use triple buffering

Change-Id: I2ae1cb03ec98ee8f31c6103ed3fc8f1f8edc4a2c

7 years agoscripts:Stop printing dbg stats scrip debug info
Tobin Ehlis [Thu, 12 Jan 2017 21:26:56 +0000 (14:26 -0700)]
scripts:Stop printing dbg stats scrip debug info

Comment out a couple of lines from the stats script that were
printing out debug information. Also update "str" var name to be
non-keyword "sub_str" and fix a broken print debug statement.

7 years agoscripts:Add stats for implicit checks
Tobin Ehlis [Thu, 12 Jan 2017 20:45:55 +0000 (13:45 -0700)]
scripts:Add stats for implicit checks

Have stats script count the un-implemented implicit checks and report
them out. Also report out the potential coverage number if all
un-implemented implicit checks are handled by parameter_validation.

7 years agoscripts:Add implicit check count to spec.py
Tobin Ehlis [Wed, 11 Jan 2017 23:18:20 +0000 (16:18 -0700)]
scripts:Add implicit check count to spec.py

Updated all implicit checks in database file to include the text
'implicit' in their note field.

spec.py will add 'implicit' to the note field for any new implicit
checks that are added, and will also print out a count of implicit
checks.

7 years agoloader: Fix phys device error message
Lenny Komow [Thu, 12 Jan 2017 22:47:53 +0000 (15:47 -0700)]
loader: Fix phys device error message

Change-Id: I37cfdb4b290dc8d5be7c606e32eb8d369ea43c6a

7 years agoloader: Modify EnumPhysDev functions
Mark Young [Thu, 12 Jan 2017 19:27:19 +0000 (12:27 -0700)]
loader: Modify EnumPhysDev functions

Modify the loader's trampoline and terminator
vkEnumeratePhysicalDevice functions to utilize helper functions.
Also, fix the failure in CTS.

Change-Id: Id9356fffd42f878c660ac8ee831e7527cce608bd

7 years agoloader: Fix variable shadowing warning.
Jamie Madill [Wed, 11 Jan 2017 20:51:01 +0000 (15:51 -0500)]
loader: Fix variable shadowing warning.

Change-Id: I71916c5300c24158901123f775b7b2fec3293e5b

7 years agodemos: Fix static analysis warnings in vulkaninfo
Karl Schultz [Wed, 11 Jan 2017 19:15:58 +0000 (12:15 -0700)]
demos: Fix static analysis warnings in vulkaninfo

Add exit code after failed mallocs.
Dynamically allocate gpu info and handle arrays, getting
rid of artificial limit.  This also moves a large allocation
from the stack to the heap.
There are still some false positives from the MSFT analyzer
that aren't worth fixing or suppressing.

7 years agodemos: smoketest: Add --flush option for tracing
joey-lunarg [Tue, 10 Jan 2017 22:55:49 +0000 (15:55 -0700)]
demos: smoketest: Add --flush option for tracing

Running smoketest with --flush will call vkFlushMappedMemoryRanges so
that the trace layer is aware of modified memory. This is not
necessary with the --PMB option in vktrace.

Change-Id: If72c0ed0c651cf82f2f2c4c78ec2534a0d475a9c

7 years agolayers: Update CV authors
Mark Lobodzinski [Wed, 11 Jan 2017 22:25:28 +0000 (15:25 -0700)]
layers: Update CV authors

Change-Id: I153a68206db8d5f346755f0691bdca777908d748

7 years agolayers: Plumb function name/idx through swapchain
Mark Lobodzinski [Wed, 11 Jan 2017 20:54:09 +0000 (13:54 -0700)]
layers: Plumb function name/idx through swapchain

PreCallValidateCreateSwapchainKHR is now used to validate
CreateSwapchain as well as CreateSharedSwapchains. Plumbed the
functionName down through the validation code so users can see the
faulting API and the bad swapchain index.

Change-Id: Ieb885704bef8a73c09e6670594e96494b62cb1a4

7 years agolayers: Refactor CreateSharedwapChains for recording
Mark Lobodzinski [Wed, 11 Jan 2017 20:14:36 +0000 (13:14 -0700)]
layers: Refactor CreateSharedwapChains for recording

Added PreCallValidate and PostCallRecord functions for this API.

Change-Id: Iebf8eb980dadbb29cceffd6a9fefb5340939eb0f

7 years agolayers: Refactor CreateSwapChain for recording
Mark Lobodzinski [Wed, 11 Jan 2017 19:09:31 +0000 (12:09 -0700)]
layers: Refactor CreateSwapChain for recording

Added a PostCallRecord function for this API.

Change-Id: I6f9e67ea5fbcf1ee4f54043c5269ad282339a9db

7 years agolayers: GH1199, Validate SharedSwapchains
Mark Lobodzinski [Wed, 11 Jan 2017 01:10:03 +0000 (18:10 -0700)]
layers: GH1199, Validate SharedSwapchains

Change-Id: I1e382aefdd13ed6c575d3654962e09e9558af97f

7 years agoloader: Add more logging messages
Mark Young [Tue, 10 Jan 2017 21:22:15 +0000 (14:22 -0700)]
loader: Add more logging messages

Add more logging messages on Error cases to help debugging.

Change-Id: I78b6bd7c73d7234283bf94d745c8733d59752422

7 years agoscripts: Remove vulkan.py
Mark Lobodzinski [Tue, 10 Jan 2017 20:15:42 +0000 (13:15 -0700)]
scripts: Remove vulkan.py

Change-Id: I95b1c346d3611c6d6b3a22f108b4b5ff9c313e0c

7 years agoscripts: Remove vk_helper.py
Mark Lobodzinski [Tue, 10 Jan 2017 19:00:25 +0000 (12:00 -0700)]
scripts: Remove vk_helper.py

This functionality is now generated entirely from vk.xml.

Change-Id: Ie3385f924b6ec9a8d74f2ad6fed7064ab0dc0534

7 years agoandroid: Switch safe_struct over to new codegen
Mark Lobodzinski [Tue, 10 Jan 2017 18:55:48 +0000 (11:55 -0700)]
android: Switch safe_struct over to new codegen

Change-Id: Ia89cfec2b836437c2f2009608795d1ee38b811ad

7 years agolayers: Update cmake for safe_struct codegen
Mark Lobodzinski [Mon, 9 Jan 2017 21:42:52 +0000 (14:42 -0700)]
layers: Update cmake for safe_struct codegen

Change-Id: Idc0e76aa479d2c9f3e096a31f620eb96d843849d

7 years agoscripts: Update copyright notice dates for 2017
Mark Lobodzinski [Tue, 10 Jan 2017 18:42:22 +0000 (11:42 -0700)]
scripts: Update copyright notice dates for 2017

Change-Id: I6adc6a8ac07f2ac11814a6f8cd06b7d5b0c49797

7 years agoscripts: Initial version of safe_struct cpp gen
Mark Lobodzinski [Wed, 4 Jan 2017 16:16:00 +0000 (09:16 -0700)]
scripts: Initial version of safe_struct cpp gen

Change-Id: I1f3c28b7737e58731206e93af50fb1d18cd4f937

7 years agoscripts: Update comments in helper generator
Mark Lobodzinski [Tue, 3 Jan 2017 20:25:10 +0000 (13:25 -0700)]
scripts: Update comments in helper generator

Change-Id: Ie4171bb18ff499e54bdbd8ff7237e7026e6cf3e9