platform/upstream/Vulkan-Tools.git
6 years agolayers: Add warning for LOAD_OP_LOAD+LAYOUT_UNDEFINED
Jason Ekstrand [Mon, 4 Dec 2017 04:16:32 +0000 (20:16 -0800)]
layers: Add warning for LOAD_OP_LOAD+LAYOUT_UNDEFINED

While not technically an error (VK_IMAGE_LAYOUT_UNDEFINED is always
allowed as an initial layout), this combination is almost never what
you actually want.  If nothing else, it's a potential performance
problem because VK_ATTACHMENT_LOAD_OP_LOAD is liable to be more
expensive than VK_ATTACHMENT_LOAD_OP_DONT_CARE.  Give developers a
helpful warning in this case.

This would have caught an actual bug in some of the Sascha Willems
demos as fixed in this PR:

https://github.com/SaschaWillems/Vulkan/pull/400

Change-Id: I73c64ae60a65cfb200db00707d650ec8da7ba130

6 years agoRevert "tests: Update MismatchedQueueFamiliesOnSubmit"
Tobin Ehlis [Tue, 5 Dec 2017 19:06:36 +0000 (12:06 -0700)]
Revert "tests: Update MismatchedQueueFamiliesOnSubmit"

This reverts commit 21420916e4dee67474655fe08b3d1125598b407d.

6 years agotests: Update MismatchedQueueFamiliesOnSubmit
Petr Kraus [Tue, 5 Dec 2017 03:02:44 +0000 (04:02 +0100)]
tests: Update MismatchedQueueFamiliesOnSubmit

- report clearly if it is skipped
- don't rely on test state for the pool
- use VUID and update database
- should fix one of the "Unexpected" in CI tests

6 years agolayers:Limit warning on secondary command buffer
Tobin Ehlis [Fri, 1 Dec 2017 22:59:53 +0000 (15:59 -0700)]
layers:Limit warning on secondary command buffer

Only warn if a secondary command buffer has a renderPass that is valid
and has not set VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT. This
avoid warning for the case where uninitialized data is present in the
renderPass handle.

6 years agolayers: Remove unused variable from core validation.
Jamie Madill [Sun, 3 Dec 2017 17:25:32 +0000 (12:25 -0500)]
layers: Remove unused variable from core validation.

6 years agoloader: Fix Clang errors/warnings.
Jamie Madill [Sun, 3 Dec 2017 16:59:17 +0000 (11:59 -0500)]
loader: Fix Clang errors/warnings.

Fixes:

format specifies type 'int' but the argument has type 'DWORD' (aka 'unsigned long') [-Werror,-Wformat]
error : expected ')' (issue with __FUNCTION__ and format string)

6 years agobuild: Change AppVeyor config to use multiple jobs.
Karl Schultz [Sat, 2 Dec 2017 21:17:12 +0000 (14:17 -0700)]
build: Change AppVeyor config to use multiple jobs.

This is a complete rewrite of the AppVeyor config file.

A separate job is used for each config in the Platform-Configuration
matrix.  This helps get around the problem of the 60-minute limit per job.

The invocation of the update_external_sources script has been
replaced with individual commands to build glslang and spirv-tools
only for the platform configuration selected for each job.
This avoids having to build glslang and spirv-tools 4 times for each job.

6 years agolayers:Add secondary CB warning
Tobin Ehlis [Tue, 28 Nov 2017 22:02:29 +0000 (15:02 -0700)]
layers:Add secondary CB warning

Fixes #2237

If VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not set by a
secondary command buffer, then any renderPass specified in the
inheritance info will be ignored. Adding a warning if a non-NULL
renderPass is included in the inheritance info but the
VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not set. This is
likely an oversight by the user and the current validation error that
this case leads to (no active renderPass) doesn't directly point to the
root cause.

6 years agodemos: Fix barrier settings for texture in cube demos
Karl Schultz [Wed, 22 Nov 2017 23:43:15 +0000 (16:43 -0700)]
demos: Fix barrier settings for texture in cube demos

Change-Id: Ibaa3901daa7a632022b67e53dd34f79be594ded1

6 years agotests: Tests for pipeline multisample pnext check
John Zulauf [Thu, 16 Nov 2017 17:12:55 +0000 (10:12 -0700)]
tests: Tests for pipeline multisample pnext check

Added test for validation checks of
    VUID-VkPipelineMultisampleStateCreateInfo-pNext-pNext
    (VALIDATION_ERROR_1001c40d)

Change-Id: I41fb10698d88db1e4b143007c36b5a798e1adc6b

6 years agolayers: Update pipeline multisample pnext check
John Zulauf [Tue, 14 Nov 2017 18:43:19 +0000 (11:43 -0700)]
layers: Update pipeline multisample pnext check

Updated validation check for
VUID-VkPipelineMultisampleStateCreateInfo-pNext-pNext
(VALIDATION_ERROR_1001c40d) to include the valid extension pNext sType
values valid for the current spec:
    VkPipelineCoverageModulationStateCreateInfoNV,
    VkPipelineCoverageToColorStateCreateInfoNV, or
    VkPipelineSampleLocationsStateCreateInfoEXT

Change-Id: Ic3e054110c2bad4b44121a67e7e61e627fa9c559

6 years agotests: Added PipelineMultiSample VUID tests
John Zulauf [Sun, 12 Nov 2017 02:13:43 +0000 (19:13 -0700)]
tests: Added PipelineMultiSample VUID tests

Added tests for validation checks:

VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784
(VALIDATION_ERROR_10000620)

VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786
(VALIDATION_ERROR_10000624)

Change-Id: I49fcfc8f55275f27a976ea88619674c3b87285ae

6 years agolayers: Added PipelineMultiSample VUID checks
John Zulauf [Mon, 6 Nov 2017 18:15:53 +0000 (11:15 -0700)]
layers: Added PipelineMultiSample VUID checks

Added validation checks for:

VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784
(VALIDATION_ERROR_10000620)
    If the sample rate shading feature is not enabled,
    sampleShadingEnable must be VK_FALSE

VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786
(VALIDATION_ERROR_10000624)
    minSampleShading must be in the range [0,1]

Change-Id: I21cdaf99f8970df4f2e03026a4dae00746ad8386

6 years agolayers: validation_cache review feedback
Cort Stratton [Tue, 28 Nov 2017 00:43:14 +0000 (16:43 -0800)]
layers: validation_cache review feedback

6 years agotests: Add test for vkMergeValidationCachesEXT()
Cort Stratton [Thu, 23 Nov 2017 01:24:36 +0000 (17:24 -0800)]
tests: Add test for vkMergeValidationCachesEXT()

6 years agolayers: Check EXT_validation_cache's sole non-trivial VU
Cort Stratton [Thu, 23 Nov 2017 01:23:16 +0000 (17:23 -0800)]
layers: Check EXT_validation_cache's sole non-trivial VU

A cache can't be merged with itself.

6 years agolayers: Tidy up shader cache, reserve space before merging
Chris Forbes [Thu, 23 Nov 2017 00:54:46 +0000 (16:54 -0800)]
layers: Tidy up shader cache, reserve space before merging

6 years agoinlined commitIdLen into assert
Cort Stratton [Thu, 23 Nov 2017 00:19:21 +0000 (16:19 -0800)]
inlined commitIdLen into assert

6 years agoConvert SPIRV-Tools commit ID to binary before use as a UUID
Cort Stratton [Thu, 23 Nov 2017 00:05:49 +0000 (16:05 -0800)]
Convert SPIRV-Tools commit ID to binary before use as a UUID

This doubles the number of effective hash bits from 64 to 128.

6 years agoFix build errors:
Cort Stratton [Thu, 23 Nov 2017 00:04:23 +0000 (16:04 -0800)]
Fix build errors:

- No more SPIRV-Tools revision file. Instead, the
  revision-parsing script just runs "git rev-parse HEAD"
  in the spirv-tools repository to extract the commit ID.
- Invoke the revision-parsing script from the .sh Android scripts,
  in addition to the .bat scripts.

6 years agoFix for Android build error with Linux host
Cort Stratton [Wed, 22 Nov 2017 21:06:57 +0000 (13:06 -0800)]
Fix for Android build error with Linux host

6 years agoUse SPIRV-Tools commit ID as validation cache version
Cort Stratton [Tue, 7 Nov 2017 03:13:53 +0000 (19:13 -0800)]
Use SPIRV-Tools commit ID as validation cache version

6 years agoshader module codeSize is already in bytes
Cort Stratton [Wed, 1 Nov 2017 20:46:21 +0000 (13:46 -0700)]
shader module codeSize is already in bytes

6 years agolayers: Add layer metadata for EXT_validation_cache extension
Chris Forbes [Mon, 30 Oct 2017 23:08:19 +0000 (16:08 -0700)]
layers: Add layer metadata for EXT_validation_cache extension

6 years agolayers: Add VK_EXT_validation_cache implementation for shaders
Chris Forbes [Mon, 24 Jul 2017 22:35:29 +0000 (15:35 -0700)]
layers: Add VK_EXT_validation_cache implementation for shaders

6 years agolayers: Add xxhash
Chris Forbes [Mon, 24 Jul 2017 22:39:07 +0000 (15:39 -0700)]
layers: Add xxhash

6 years agoAdd missing include in android_util.cpp
Petr Kraus [Tue, 28 Nov 2017 02:22:41 +0000 (03:22 +0100)]
Add missing include in android_util.cpp

6 years agoloader: fix memory leak for layers with >1 dev_exts
Cort Stratton [Tue, 28 Nov 2017 20:11:05 +0000 (12:11 -0800)]
loader: fix memory leak for layers with >1 dev_exts

6 years agolayers: Fix typos in viewport state validation msgs
Petr Kraus [Thu, 23 Nov 2017 14:47:38 +0000 (15:47 +0100)]
layers: Fix typos in viewport state validation msgs

6 years agotests: Implement lineWIdth state checks
Petr Kraus [Fri, 24 Nov 2017 03:08:20 +0000 (04:08 +0100)]
tests: Implement lineWIdth state checks

6 years agolayers: Fix lineWidth checks
Petr Kraus [Fri, 24 Nov 2017 02:09:03 +0000 (03:09 +0100)]
layers: Fix lineWidth checks

- migrate to parameter_validatio
- do not check against limit (outside limits is valid; impl clamps
value)

6 years agolayers: Quick fix odd create PSO param checks
Petr Kraus [Fri, 24 Nov 2017 02:05:50 +0000 (03:05 +0100)]
layers: Quick fix odd create PSO param checks

- param check did only check the first create info
- `cullMode` check should be redundant to the automated part

6 years agoheader: Update to version 1.0.66 of the Vulkan hdr
Mark Lobodzinski [Mon, 27 Nov 2017 19:00:45 +0000 (12:00 -0700)]
header: Update to version 1.0.66 of the Vulkan hdr

- update vulkan.h
- update Lin/Win json file versions
- update vk.xml
- update vuid_mapping.py
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp
- fixed error in vk.xml, unofficially

Change-Id: Ia719bc069cb776c5b174f41667d591b43aaaf4d7

6 years agolayers: Fix MSVS conversion warning.
Jamie Madill [Wed, 8 Nov 2017 21:25:22 +0000 (16:25 -0500)]
layers: Fix MSVS conversion warning.

This fixes the following:

warning C4245: 'argument': conversion from 'int' to 'unsigned int', signed/unsigned mismatch

It also modifies the build to enable this warning by default.

Change-Id: If2e6c8d43811162a9a382883b3d55a148975fc37

6 years agoloader: Fix improper cast warning.
Jamie Madill [Wed, 8 Nov 2017 19:48:32 +0000 (14:48 -0500)]
loader: Fix improper cast warning.

warning C4057: 'function': 'LPBYTE' differs in indirection to slightly different base types

This was popping up in some Windows builds. Also add it to the list
of warnings enabled by default with MSVS.

Change-Id: I2703f2e57ba3fb33ec03fbc7b8324c75187abec6

6 years agobuild: Fix gslang->glslang errors in BUILD.md
Mark Lobodzinski [Tue, 21 Nov 2017 18:00:25 +0000 (11:00 -0700)]
build: Fix gslang->glslang errors in BUILD.md

Change-Id: I221fde5b016cf36ec1047287dbfb82a1a81e0b09

6 years agobuild: Updated BUILD.md for spirv-tools changes
Mark Lobodzinski [Fri, 17 Nov 2017 18:20:02 +0000 (11:20 -0700)]
build: Updated BUILD.md for spirv-tools changes

Change-Id: Ic2f62a226474dbe5705be2706efc093b3dde7b9e

6 years agobuild: Removed unused spirv-tools/headers rev files
Mark Lobodzinski [Fri, 17 Nov 2017 18:14:52 +0000 (11:14 -0700)]
build: Removed unused spirv-tools/headers rev files

Change-Id: Ie199e1b2b94a7bc8c2ea998a7725d307e9a369f8

6 years agobuild: Avoid redundant spirv-tools/hdrs builds
Mark Lobodzinski [Thu, 16 Nov 2017 20:23:05 +0000 (13:23 -0700)]
build: Avoid redundant spirv-tools/hdrs builds

Changed update_external_sources scripts to use spirv-tools and
spirv-headers already present in the glslang repo instead of
fetching and building separate versions.

Change-Id: Iff9666f1939d814d0888b2da9b9e7450af697722

6 years agoscripts: Update toolchain revision check script
Mark Lobodzinski [Fri, 17 Nov 2017 18:13:21 +0000 (11:13 -0700)]
scripts: Update toolchain revision check script

No longer need to check spirv-tools or spirv-headers as they are now
part of glslang.

Change-Id: Ib3594d064d33a94d6443426e02a617c96b243893

6 years agotests: Added GetQueryPoolResults test case
Mark Lobodzinski [Thu, 9 Nov 2017 23:45:44 +0000 (16:45 -0700)]
tests: Added GetQueryPoolResults test case

And updated the error database.

Change-Id: Id293ee836866ce9bbfc3a4eda4ee0e8efd0e09ab

6 years agolayers: Add GetQueryPoolResults validation check
Mark Lobodzinski [Thu, 9 Nov 2017 23:43:06 +0000 (16:43 -0700)]
layers: Add GetQueryPoolResults validation check

Added check for a pool of queryType TIMESTAMP having the RESULT PARTIAL
bit set and updated the error database.

Change-Id: I139733202c085a7d64d7359f659714b75a46ebf1

6 years agolayers: Remove invalid query avaibility error check
Mark Lobodzinski [Mon, 13 Nov 2017 20:52:05 +0000 (13:52 -0700)]
layers: Remove invalid query avaibility error check

This case in GetQueryPoolResults flagged errors for cases that are
valid.

Change-Id: I00a823992d200cd30988fde39ef679ea8ad8bce3

6 years agolayers: Refactor PreCallValidateGetQueryPoolResults
Mark Lobodzinski [Mon, 13 Nov 2017 20:42:20 +0000 (13:42 -0700)]
layers: Refactor PreCallValidateGetQueryPoolResults

Cleared up logic flow.

Change-Id: I32157a408a7ff7e413ab82b05bf86de48f98495b

6 years agolayers: Remove redundant query_state_pair checks
Mark Lobodzinski [Mon, 13 Nov 2017 19:00:12 +0000 (12:00 -0700)]
layers: Remove redundant query_state_pair checks

Change-Id: I62b722124c58d98da642cc2c5c17670a7f290d64

6 years agotests: Add test case for vkCmdBlitImage() image layouts
Norbert Garnys [Fri, 17 Nov 2017 10:38:21 +0000 (11:38 +0100)]
tests: Add test case for vkCmdBlitImage() image layouts

6 years agolayers: add image layout validation to vkCmdBlitImage()
Norbert Garnys [Thu, 16 Nov 2017 09:58:04 +0000 (10:58 +0100)]
layers: add image layout validation to vkCmdBlitImage()

6 years agolayers: Rewrite ViewportState checks and tests
Petr Kraus [Thu, 16 Nov 2017 20:21:58 +0000 (21:21 +0100)]
layers: Rewrite ViewportState checks and tests

- deal with #1685
- report correct object type
- improve? msg texts a bit
- add extension structs to pNext check
- use correct printf token where possible
- make tests to match  changes + improve coverage (nullptr +
multiViewport)
- remove viewport state (and other stuff) from tests that do not use it
- merge some tests together that are too related
- remove unnecessary dynamic state from PSOLineWidthInvalid)
- correct invalid VkViewport in some places
- correct missing/null pViewport and pScissors in some places
- update and correct the VUID database

6 years agotests:Add DevSim testing for 7 profiles
Tobin Ehlis [Wed, 15 Nov 2017 23:17:47 +0000 (16:17 -0700)]
tests:Add DevSim testing for 7 profiles

Update Travis-CI run LVL tests on seven different device profiles.

6 years agolayers:Add pre-built DevSim layer
Tobin Ehlis [Wed, 15 Nov 2017 23:10:39 +0000 (16:10 -0700)]
layers:Add pre-built DevSim layer

Checking-in DevSim binary for linux to use in Travis-CI testing along
with seven initial json profiles to be tested w/ DevSim on top of mock.

6 years agoicd:Increase WHOLE_SIZE mapped memory
Tobin Ehlis [Tue, 14 Nov 2017 20:05:22 +0000 (13:05 -0700)]
icd:Increase WHOLE_SIZE mapped memory

Bump hard-coded mapped memory allocation size for WHOLE_SIZE from 4k to
64k. One validation test (InvalidMemoryMapping) was mapping 64k of
memory that was leading to segF as the 4k buffer was overwritten when
shadowed.

6 years agoicd:Expand mock icd memory type bit support
Tobin Ehlis [Tue, 14 Nov 2017 16:52:17 +0000 (09:52 -0700)]
icd:Expand mock icd memory type bit support

Image/buffer memory requirement memoryTypeBits are still just hard-
coded in mock icd, but expand to support more bits for more simulated
memory types. This helps the mock work in conjunction with the devsim
layer so that if a simulated device has more than 5 memory types, the
mock icd won't cause an error.

6 years agolayers: Validate device dispatchable objects
Mark Lobodzinski [Mon, 13 Nov 2017 16:38:23 +0000 (09:38 -0700)]
layers: Validate device dispatchable objects

Device object validation required dereferencing possibly bad device
objects. Moved ownership of device objects to instance objects, and
to search each of the layer_data object lists for a created device
handle matching the our candidate device object.

Change-Id: If5615294c397ff6991d4d21ac75ab58d1b0b0841

6 years agoscripts: Fix incorrect object type mappings
Mark Lobodzinski [Tue, 14 Nov 2017 17:19:40 +0000 (10:19 -0700)]
scripts: Fix incorrect object type mappings

'Unknown' type was at the end of a couple of the lists, causing
incorrect IDs to be emitted.

Change-Id: I55cae6ecaff47977dca78e2f73468980f9450bda

6 years agolayers: Move BuildTemplate call inside global lock
Mark Lobodzinski [Mon, 13 Nov 2017 16:42:58 +0000 (09:42 -0700)]
layers: Move BuildTemplate call inside global lock

Helper routine was being called outside of the lock causing
freezes in Dota2

Change-Id: I45ab0b23c6ff3ed4ec16dca15107ce16f205599f

6 years agotests:Add doc validation to travis CI
Tobin Ehlis [Wed, 8 Nov 2017 00:29:51 +0000 (17:29 -0700)]
tests:Add doc validation to travis CI

6 years agoloader: Fix pre-instance proc addresses
Lenny Komow [Fri, 10 Nov 2017 17:03:08 +0000 (10:03 -0700)]
loader: Fix pre-instance proc addresses

Fix a bug where vkGetInstanceProcAddr would return a null pointer for
any command that does not require an instance if an instance was
given

Change-Id: Iec5766f9c37104c36852f758d391a9b0b54ec0ec

6 years agodocs: Update some Android sections
Cody Northrop [Thu, 9 Nov 2017 22:04:03 +0000 (15:04 -0700)]
docs: Update some Android sections

6 years agoandroid: Only compile toolchain once build_all.sh
Cody Northrop [Thu, 9 Nov 2017 21:26:51 +0000 (14:26 -0700)]
android: Only compile toolchain once build_all.sh

6 years agolayers: Don't confuse VkResult/VkBool32 in generators.
Jamie Madill [Wed, 8 Nov 2017 19:11:26 +0000 (14:11 -0500)]
layers: Don't confuse VkResult/VkBool32 in generators.

In some cases, the generator would return the special error for
validation failed for functions that return a VkBool32. Fix this, and
also some cases of initializing a VkBool32 with VkResult.

Change-Id: Icc071e647f293848d62a922d492ed41dfc5a4be1

6 years agolayers: Make generator helpers Python 2 compatible.
Jamie Madill [Wed, 8 Nov 2017 18:40:09 +0000 (13:40 -0500)]
layers: Make generator helpers Python 2 compatible.

This is an easy compatiblity change, which uses a workaround to import
a version of 'open' that can support unicode across Python versions.

Affects the object tracker and parameter validation generators.

Change-Id: Ie958dc64168db9e06b36321b4b6ad2336f995ea3

6 years agolayers: Return an error when generator scripts fail.
Jamie Madill [Wed, 8 Nov 2017 18:50:14 +0000 (13:50 -0500)]
layers: Return an error when generator scripts fail.

Currently the scripts would abort with an error message, but not an OS
error code. Adding an error code allows build systems to correctly
detect the script failure as a failed build step.

Change-Id: I142a6215a3c02e6a880bfce0c3aba2c3c8fc4ff1

6 years agolayers: Adds createSampler VUID/test for IMG_CUBIC
John Zulauf [Thu, 26 Oct 2017 21:34:49 +0000 (15:34 -0600)]
layers: Adds createSampler VUID/test for IMG_CUBIC

Added VUID check to parameter_validation_layer and matching test for
VUID 12600872 (must disable anisotropy for CUBIC_IMG filters)

Change-Id: I3d0f9449413637292c2726480ca7ce0e6b793e21

6 years agolayers: VUIDs/test for vkCreateSampler anisotropy
John Zulauf [Thu, 26 Oct 2017 19:51:15 +0000 (13:51 -0600)]
layers: VUIDs/test for vkCreateSampler anisotropy

Added VUID checks to parameter_validation_layer and matching tests for
three VUID's:

  * VALIDATION_ERROR_12600868:
    Must disable anisotropy when unnormalized coordinates are enabled.
  * VALIDATION_ERROR_1260085e:
    maxAnisotropy must be in range [1.0, maxSamplerAnisotropy]
  * VALIDATION_ERROR_1260085c
    anisotropyEnable must be VK_FALSE if samplerAnisotropy feature is
    not enabled.

Removed test for: "samplerAnisotropy feature was not enabled ...
maxAnisotropy member ... must be 1.0" to conform with the resolution of
https://github.com/KhronosGroup/Vulkan-Docs/issues/503.

Change-Id: Ia1c561997adb9391ef463f6df90b424730366a7f

6 years agolayers: Rename resetCB to ResetCommandBufferNode
John Zulauf [Tue, 7 Nov 2017 22:25:38 +0000 (15:25 -0700)]
layers: Rename resetCB to ResetCommandBufferNode

Small cleanup change to clarify command buffer node code.

Change-Id: Ib98010e10161ef5b15aaa736d994ec48b4e659fb

6 years agolayers: Free commandbuffer data when deleting pool
John Zulauf [Fri, 3 Nov 2017 00:12:49 +0000 (18:12 -0600)]
layers: Free commandbuffer data when deleting pool

Fixes for https://vulkan.lunarg.com/issue/view/59eeea8166315153977b0fe6
Issue #720 - Possible crash in layers when deleting command pools.
Ensured pool commandbuffers fully freed in the layer before deleting the
pool using refactored common code from FreeCommandBuffers.

Added postive test which exercises the implicit free path.

Change-Id: I71e1fcb6ffcd9a2977a89c0a8b388639e9a743cb

6 years agobuild: Update BUILD.md to specify VS2015
Mark Lobodzinski [Tue, 7 Nov 2017 16:00:48 +0000 (09:00 -0700)]
build: Update BUILD.md to specify VS2015

Change-Id: I9180304a8089db057af68cbf86b73118e1d29c16

6 years agodemos: Remove HTML in plain-text vulkaninfo output
Gabríel Arthúr Pétursson [Tue, 7 Nov 2017 00:06:00 +0000 (00:06 +0000)]
demos: Remove HTML in plain-text vulkaninfo output

Change-Id: I6f1192b71aa6f33664a6782dc81e1f8cb7cc5ba1

6 years agoicd:Update list of tests with unexpected errors
Tobin Ehlis [Mon, 6 Nov 2017 23:27:51 +0000 (16:27 -0700)]
icd:Update list of tests with unexpected errors

Only 2 tests remain with unexpected errors when running with default
mock ICD configuration. These same two tests also have unexpected
errors when running on actual HW.

6 years agoicd:Reduce offset alignment limits
Tobin Ehlis [Fri, 3 Nov 2017 21:21:53 +0000 (15:21 -0600)]
icd:Reduce offset alignment limits

Buffer min offset alignments were set to the max value. Reduce them to
16 to simplify testing of offsets that are a multiple of the min
alignment.

6 years agoicd:Don't return support for Undefined Format
Tobin Ehlis [Fri, 3 Nov 2017 20:52:11 +0000 (14:52 -0600)]
icd:Don't return support for Undefined Format

6 years agoandroid: Remove mips targets
Cody Northrop [Mon, 6 Nov 2017 20:54:42 +0000 (13:54 -0700)]
android: Remove mips targets

6 years agoandroid: Update to shaderc known-good revisions
Cody Northrop [Fri, 3 Nov 2017 22:09:24 +0000 (16:09 -0600)]
android: Update to shaderc known-good revisions

6 years agobuild: Add optional ccache support to cmake
Cody Northrop [Tue, 31 Oct 2017 23:05:03 +0000 (17:05 -0600)]
build: Add optional ccache support to cmake

6 years agotravis: Use multiple cores for build
Cody Northrop [Tue, 31 Oct 2017 19:39:32 +0000 (13:39 -0600)]
travis: Use multiple cores for build

6 years agotravis: Switch to ccache, skip Android toolchain build
Cody Northrop [Fri, 13 Oct 2017 02:44:23 +0000 (20:44 -0600)]
travis: Switch to ccache, skip Android toolchain build

6 years agoscripts: Add --no-build for Android toolchain
Cody Northrop [Fri, 13 Oct 2017 02:44:04 +0000 (20:44 -0600)]
scripts: Add --no-build for Android toolchain

With switch to importing shaderc, we don't need to
create prebuilts anymore.

6 years agoReplaced fixed path python 2.7 executable calls
saschawillems [Fri, 3 Nov 2017 14:27:27 +0000 (15:27 +0100)]
Replaced fixed path python 2.7 executable calls

6 years agolayers: Refactored pNext chain walks to template
John Zulauf [Thu, 26 Oct 2017 18:07:05 +0000 (12:07 -0600)]
layers: Refactored pNext chain walks to template

The while loops for the walking the pNext chains were implemented by
repeated code. These were refactored into a common template.  Added
autogenerated 'traits' objects for the pNext linked structs.

Delete cut and paste duplicate pNext chain walk.

Change-Id: I46457bb5432219c74f9356e5230c70e4a9ef16df

6 years agolayers: Protect GetImage/BufferMemRqmts map access
Jean-François Marquis [Mon, 30 Oct 2017 22:14:15 +0000 (18:14 -0400)]
layers: Protect GetImage/BufferMemRqmts map access

Lock 'global_lock' while looking for IMAGE_STATE/BUFFER_STATE in
GetBufferMemoryRequirements/GetImageMemoryRequirements. This is needed
because other threads could add/remove other VkImage handles to/from
the maps concurrently. The specs say the VkImage must be externally
synchronized, but this doesn't cover the internals of the layers about
VkImages in general. vkCreateImage, vkDestroyImage and
vkBindImageMemory/vkBindBufferMemory correctly lock 'global_lock'.

Change-Id: I93cb00c9a7f99efc927da52e42103ab72516397e

6 years agodemos: Clarify cube --present_mode option
Mike Schuchardt [Wed, 1 Nov 2017 22:16:22 +0000 (16:16 -0600)]
demos: Clarify cube --present_mode option

Change-Id: Ie53724c3612eb5bb9adfbb826149ef87916f0d84

6 years agoicd: thread protect maps
Mike Stroyan [Thu, 2 Nov 2017 16:39:34 +0000 (10:39 -0600)]
icd: thread protect maps

Lock to protect threaded access to queue_map and mapped_memory_map.

6 years agodemos: Add html backend and option to vulkaninfo
Shannon McPherson [Wed, 20 Sep 2017 21:53:07 +0000 (15:53 -0600)]
demos: Add html backend and option to vulkaninfo

 - Run clang-format on vulkaninfo.c
 - Format Instance Extensions section
 - Complete Layers info tree
 - Convert spaces to tabs for html output
 - Fix indentation of html output file
 - Add Presentable Surfaces to html option
 - Ammend Presentable Surfaces html output
 - Extend platform compatibility
 - Display VkPhysicalDeviceProps in html
 - Convert DeviceLims and SparseProps to html
 - Convert memoryType/flags to support html
 - Complete AppGpuDumpMemProps html upgrade
 - Complete format properties html upgrade
 - Improve boolean logic for html_output var
 - Change output filename to vulkaninfo.html
 - Create auto-open format property flag info
 - Update page title, further .html fixes
 - WIN32 formatting and bug fixes
 - Clang-format changes
 - Close clang-format comments
 - Update file format to code style standard

Change-Id: I49c7c6c62a54493fe622bd457f7c61e81806487e

6 years agoscripts:Cleanup comments and output for mock icd
Tobin Ehlis [Tue, 31 Oct 2017 14:50:48 +0000 (08:50 -0600)]
scripts:Cleanup comments and output for mock icd

Commented out a couple of debug output statements.
Killed a bunch of comments and code that were carried over from
original script but that are no longer relevant.

6 years agoquickly wire mock icd into travis
Chris Forbes [Mon, 30 Oct 2017 18:20:26 +0000 (11:20 -0700)]
quickly wire mock icd into travis

6 years agolayers: Capture device features from extension
John Zulauf [Thu, 19 Oct 2017 00:21:23 +0000 (18:21 -0600)]
layers: Capture device features from extension

When the VK_KHR_get_physical_device_properties2 is present, physical
device properties can be passed to VkCreate either in the
pEnabledFeatures member or VkDeviceCreateInfo or in a
VkPhysicalDeviceFeatures2KHR structure on the pNext chain.

Neither the parameter validation or core validation layers were
capturing device features from the pNext struct, causing false
parameter checking errors, when the default (all false) state was
used for later validations.

Change-Id: I187827443f09aafaa80588a78bc5b67595d0acda

6 years agolayers: Cleanup duplicate structure definition
John Zulauf [Wed, 18 Oct 2017 17:33:36 +0000 (11:33 -0600)]
layers: Cleanup duplicate structure definition

A function local structure was duplicating the GENERIC_HEADER defintion.
To improve consistency and maintainability the duplicate struct was
removed and all references change to use GENERIC_HEADER.

Change-Id: I872ba9185959fc2de2ece33f8e236cfc6c805497

6 years agolayers: Remove warning for imported memory
Mike Schuchardt [Thu, 26 Oct 2017 20:05:52 +0000 (14:05 -0600)]
layers: Remove warning for imported memory

Flag imported memory as valid to suppress warnings about uninitialized
buffers and images that use external memory

Change-Id: Id286dfde41a02652767202a31758f44202d9875a

6 years agoicd:Fixes for Windows build
Tobin Ehlis [Fri, 27 Oct 2017 18:40:32 +0000 (12:40 -0600)]
icd:Fixes for Windows build

6 years agoicd:Add Windows def file
Tobin Ehlis [Fri, 27 Oct 2017 00:09:12 +0000 (18:09 -0600)]
icd:Add Windows def file

6 years agotests:Fix EmptyDescriptorUpdateTest test
Tobin Ehlis [Fri, 27 Oct 2017 00:03:12 +0000 (18:03 -0600)]
tests:Fix EmptyDescriptorUpdateTest test

Make sure that allocation for buffer is large enough to accommodate the
buffer's device memory requirements.
This fixes last failing test with mock. Also reran through all tests
and updating unexpected error and skipped test lists.

6 years agoicd:Get more tests passing on mock ICD
Tobin Ehlis [Thu, 26 Oct 2017 23:25:05 +0000 (17:25 -0600)]
icd:Get more tests passing on mock ICD

Modifying hard-coded minImageTransferGranularity for the queue from
{0,0,0}, which has special restrictions, to {1,1,1} which is more
lenient and removes some unexpected errors, allowing six more tests to
pass.

6 years agoicd:Limit image properties for linear images
Tobin Ehlis [Thu, 26 Oct 2017 21:21:51 +0000 (15:21 -0600)]
icd:Limit image properties for linear images

If an image is linear, return max mips, layers, and sample count of 1.

6 years agoscripts:Skip some extensions in mock ICD
Tobin Ehlis [Thu, 26 Oct 2017 20:47:51 +0000 (14:47 -0600)]
scripts:Skip some extensions in mock ICD

Mock ICD doesn't need to implement validation cache extension. Add
simple list of excluded exceptions so we can kill any cases that we
don't want in mock ICD. Initially only excludes validation cache.

6 years agotests:Fix InvalidBarriers test
Tobin Ehlis [Thu, 26 Oct 2017 19:44:46 +0000 (13:44 -0600)]
tests:Fix InvalidBarriers test

InvalidBarriers test made invalid assumption that internal size of
buffer memory was same as requested size. Update test so that when we
exceed buffer size we do that based on internal size instead of
requested size.

6 years agolayers:Kill extra whitespace in CMakeLists.txt
Tobin Ehlis [Thu, 26 Oct 2017 19:01:28 +0000 (13:01 -0600)]
layers:Kill extra whitespace in CMakeLists.txt

6 years agoicd: Adding generated mock icd
Tobin Ehlis [Fri, 13 Oct 2017 15:26:20 +0000 (09:26 -0600)]
icd: Adding generated mock icd

Initial check-in for mock icd which is being built to allow validation
testing without the need for an actual Vulkan device.

ICD is currently building and passing 324/332 tests. It creates ptr
handles for dispatchable objects and unique id handles for
non-dispatchable objects. It currently has some hard-coded values for
various Get* device-query functions in order to allow forward progress.
The long-term intention is to allow the device configuration to be set
by the test itself.

See the ICD README.md file for more info.

6 years agoheader: Update to version 1.0.65 of the Vulkan hdr
Mark Lobodzinski [Mon, 30 Oct 2017 15:35:31 +0000 (09:35 -0600)]
header: Update to version 1.0.65 of the Vulkan hdr

- update vulkan.h
- update vk.xml
- update Win/Lin json file versions
- update vk_validation_error_messages.h
- update vk_validation_error_database.txt
- update vulkan.hpp

Change-Id: Ib20f1955df85a31069c9ffc69c3260973b2c6633

6 years agorepo: normalize line termination across repo
Mike Weiblen [Sun, 29 Oct 2017 23:56:25 +0000 (17:56 -0600)]
repo: normalize line termination across repo

This is a scrub of the entire repo to normalize end-of-line termination to
conform to the recently added .gitattributes file.  A mismatch of line
termination can cause difficult-to-resolve conflicts when rebasing or merging.

The process performed is described at:
https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

The .gitattributes file is required because some files (*.bat and *.sh) are
sensitive to line termination.  The .gitattributes file is stored in the repo,
and overrides settings which could be corrupted by a developer's local
git configuration.  The .gitattributes file was added in f077c81

This commit completes bcc9fec, which fixed a single file.

Change-Id: I75d4594b61cb8aa6a09efb3ed5ace34fe8394871

6 years agoexternal: Update external commit IDs
Mike Weiblen [Mon, 30 Oct 2017 02:19:38 +0000 (20:19 -0600)]
external: Update external commit IDs

Update to top-of-tree glslang, plus the spirv dependencies specified by
glslang's known_good.json file.

Change-Id: I41c32e2dee320eb2cbd92f0d6a3374c643e93dd7