platform/upstream/Vulkan-LoaderAndValidationLayers.git
8 years agotests: post push resolution of Nvidia GH424Rework issues
Mark Mueller [Wed, 17 Aug 2016 21:23:23 +0000 (15:23 -0600)]
tests: post push resolution of Nvidia GH424Rework issues

vkEnumeratePhysicalDevices validation tests are not working on
recent NVidia drivers

Change-Id: Ie4985eef9ae27c8e1b80ea9388cea8f264950895

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

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

Change-Id: Ib1b796c7901fe0377eda1d8b42083ddd1ec009a8

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

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

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

A clarification fix was done incorrectly, this resolves that.

Change-Id: Ie093f72ee3d6daebf3f9fa8530893313ac282ba5

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

Doc changes to reflect test additions

Change-Id: I18488615b2323dc38505e6a2df18fd960ea56bf4

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

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

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

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

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

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

Change-Id: Ib1589e24d6c9584e68779c93b91de927a177ec8d

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

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

Change-Id: Ied673a9b932210de52ed189c67221af60415cae9

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

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

Change-Id: I5a8f34c2ac8b9a1f074311a16e8635cf34c1e2bc

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

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

Change-Id: I11324dcf4523b094d7545f406d5f87a1145e0563

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

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

Change-Id: Ib3d228eae9b347163a9a347e04db752d421b1291

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

Change-Id: Iaebe81e34e76d4760d1097da23d52d7ca2ef4273

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

Fixed some variable names and removed c-style casts.

Change-Id: I994ca311665a59d0f81ce0cfdeda4a66deb632be

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

This validation is already performed in parameter_validation.

Change-Id: I5fd8e92c885300aa35537d825ea67fabb723062e

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

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

Change-Id: I2a21be76f83eed9fb3055f6f57f22204c9ea76f0

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

LOG_PERF_WARNING was not used.

Change-Id: I89f84611b37a809493e3d23c53809263d48b3065

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

Correct object pointers passed now.

Change-Id: Ib18e1849da2761373386eb44c2549be7c28752ab

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

This validation is already performed in parameter_validation.

Change-Id: I3c1a7f17d68fa81f7770b7dd88cb075be8e59175

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

This validation is already performed in parameter_validation.

Change-Id: I0b9e83cf241bfa5de93c90898f6cd5b6d9b745b5

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

Change-Id: Ib9c58f05ef045f0450f1ba62dfc7ea4498ac119e

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

Change-Id: I44d19882af69541cfe9876a22fecc0a09056ba0b

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

These are all overed in parameter_validation.

Change-Id: I23a7fc281414b6b8bcf30c5a9660560f2b51177f

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

Change-Id: I0609694a3743ca764bcda6de66c0431fb63c1ad1

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

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

Change-Id: I6d272cafcd8554f068896312a2b0f41a42d108be

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

DynamicBlendConstantsNotBound was misspelled.

Change-Id: I33f4d53e336dc39b5f23583ee24df88441a339ac

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

Change-Id: Ibcb07fe5f357e001e9d91897eebd1dfce78198d6

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

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

Change-Id: If43d8d2f30fa892b96cb90585eb0513649c535f7

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

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

Change-Id: I1c9cbf73a03da80bb85b8789ec5053ffbf4a733a

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

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

Change-Id: I6cfdfac8f5c9ff7d27b94bf0aa80ae1249b0ce25

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

DynamiBlendConstantsNotBound -> DynamicBlendConstantsNotBound

Change-Id: If30b93d8cfb32dade686d44b615b772f6504ee17

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

Change-Id: I1c924977a420bc7a417710b82f0a42f4ae5dd4c3

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

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

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

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

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

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

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

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

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

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

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

8 years agolayers : Update memory valid to be per-range
Tobin Ehlis [Wed, 10 Aug 2016 22:08:00 +0000 (16:08 -0600)]
layers : Update memory valid to be per-range

We previously only tracked a single valid bool for an entire allocation.
That can easily get out of synch when multiple objects are bound to the
same allocation. This update moves the valid tracking to be per-range so
that it can be tracked on a per-object basis.

This does handle aliasing cases where various objects completely alias each
other, but there are still various aliased resource cases that aren't handled.

8 years agolayers: Refactor InsertMemoryRange
Tobin Ehlis [Wed, 10 Aug 2016 15:55:59 +0000 (09:55 -0600)]
layers: Refactor InsertMemoryRange

Work with local MEMORY_RANGE struct and insert to map at the end.
This avoids a loop pass and the awkward loop check of a range against itself.
Adds the slight complexity of storing aliases during loop and updating them
after the loop, but I prefer that to the alternative.

8 years agolayers: Update bound memory tracking and alias checking
Tobin Ehlis [Mon, 8 Aug 2016 18:33:11 +0000 (12:33 -0600)]
layers: Update bound memory tracking and alias checking

Store all ranges bound to a single memory allocation in a single map indexed by object id.
Add two separate unordered_sets for independent image and vector processing.

Added a set of aliases to MEMORY_RANGE struct to hold any aliased ranges.
Insert aliased ranges at create time and remove the aliases when a range
is destroyed.

Have a single function, rangesInterset, to track if regions bound to a memory
allocation overlap, and if linear/non-linear overlap in violation of the spec.

8 years agodemos : SAM6 Flip projection matrix, instead of vertex-shader
Rene Lindsay [Fri, 12 Aug 2016 23:56:09 +0000 (17:56 -0600)]
demos : SAM6 Flip projection matrix, instead of vertex-shader

Change-Id: I0000000000decaf15bad0000000000000000006b

8 years agowinsdk: Clean up confiure_runtime.c and docs
Lenny Komow [Fri, 12 Aug 2016 19:26:20 +0000 (13:26 -0600)]
winsdk: Clean up confiure_runtime.c and docs

8 years agowinsdk: Make RT installer use C program
Lenny Komow [Wed, 10 Aug 2016 16:31:07 +0000 (10:31 -0600)]
winsdk: Make RT installer use C program

8 years agowinsdk: Add C program for runtime configuration
Lenny Komow [Tue, 9 Aug 2016 21:56:15 +0000 (15:56 -0600)]
winsdk: Add C program for runtime configuration

8 years agodocs: Add renderpass tests from GH427
Tony Barbour [Wed, 10 Aug 2016 16:32:42 +0000 (10:32 -0600)]
docs: Add renderpass tests from GH427

Change-Id: I3804836836af714fd9ba3138518d5c78832fc4d5

8 years agotests: Add renderpass tests GH427
Tony Barbour [Tue, 9 Aug 2016 19:27:40 +0000 (13:27 -0600)]
tests: Add renderpass tests GH427

Change-Id: Ia86bfa71682613cb98721c0232c94daa6afe3c1a

8 years agotests: Add VkRenderpassObj to render framework
Tony Barbour [Tue, 9 Aug 2016 21:42:33 +0000 (15:42 -0600)]
tests: Add VkRenderpassObj to render framework

Change-Id: I04e4ee692180597cf9aae8443bb75205ebf092b9

8 years agotests: Add PhysicalDeviceFeatures to VkDeviceObj
Tony Barbour [Tue, 9 Aug 2016 19:44:00 +0000 (13:44 -0600)]
tests: Add PhysicalDeviceFeatures to VkDeviceObj

Change-Id: I0465402cc72b829096e422548be68cf27afb8a1e

8 years agospirv-headers : Add file to restrict to commit
Mark Young [Thu, 11 Aug 2016 14:46:55 +0000 (08:46 -0600)]
spirv-headers : Add file to restrict to commit

Restrict spirv-headers to a specific commit (just as we do to
spirv-tools and glslang) by creating a new file
(spirv-headers_revision) to track the commit we want to
syncrhonize to.  Also update the update_external_sources scripts
to use it.  This will make sure that we don't run into the
scenario where spirv-tools and spirv-headers are incompatible.

Change-Id: Ia4fdd921a5c1c500d7f751db08b6998b3d704f2d

8 years agolayers: Update PV variable names, clang-format
Mark Lobodzinski [Thu, 11 Aug 2016 19:25:38 +0000 (13:25 -0600)]
layers: Update PV variable names, clang-format

Change-Id: I1c1da95bbfa1dce31b2b109ec7dea0c770af44c9

8 years agolayers: Add WSI support to parameter_validation
Mark Lobodzinski [Tue, 9 Aug 2016 16:44:38 +0000 (10:44 -0600)]
layers: Add WSI support to parameter_validation

Change-Id: Ieb52e121632c6297eee5e37baeade5f0c8f8f3e5

8 years agolayers: Validate Enabled Features in PV
Mark Lobodzinski [Tue, 9 Aug 2016 19:41:09 +0000 (13:41 -0600)]
layers: Validate Enabled Features in PV

ParameterValidation was using the hardware supported feature set for
validation -- these are now replaced with the application-enabled
features at CreateDevice time.

Change-Id: If52d3ae3e55c69611e02437d33a651d88ba7043d

8 years agomisc: Add vulkan C++ header
Lenny Komow [Thu, 11 Aug 2016 17:23:15 +0000 (11:23 -0600)]
misc: Add vulkan C++ header

8 years agodemos: Fix useless NULL check in cube and tri
Lenny Komow [Thu, 11 Aug 2016 16:57:38 +0000 (10:57 -0600)]
demos: Fix useless NULL check in cube and tri

8 years agolayers: Refactor function names
Tobin Ehlis [Thu, 11 Aug 2016 13:43:03 +0000 (07:43 -0600)]
layers: Refactor function names

Capitalize first letter of Validate[Image|Buffer]UsageFlags() functions

8 years agolayers: Fixes GH846 Use IMAGE_USAGE bits for images
Tobin Ehlis [Thu, 11 Aug 2016 13:16:53 +0000 (07:16 -0600)]
layers: Fixes GH846 Use IMAGE_USAGE bits for images

Cut-and-paste bug. Various checks for images usage flags were being made
against BUFFER_USAGE enums instead of IMAGE_USAGE enums

8 years agotests: Remove unused var
Tobin Ehlis [Wed, 10 Aug 2016 23:10:46 +0000 (17:10 -0600)]
tests: Remove unused var

8 years agolayers: Update details doc w/new queue family test
Mark Lobodzinski [Wed, 10 Aug 2016 19:12:23 +0000 (13:12 -0600)]
layers: Update details doc w/new queue family test

Added MismatchedQueueFamiliesOnSubmit() test for validating
DRAWSTATE_INVALID_QUEUE_FAMILY errors.

Change-Id: I86ff4da21840a679e755790ae6c7810a0f752028

8 years agotests: Add QFI-queueSubmit test
Mark Lobodzinski [Tue, 9 Aug 2016 22:43:19 +0000 (16:43 -0600)]
tests: Add QFI-queueSubmit test

Added MismatchedQueueFamiliesOnSubmit test which creates a command
buffer using one queue family and submits it to a queue using a
different queue family.

Change-Id: If2d974be6a243f7fafaf3926a504b40147375ccb

8 years agolayers: GH790, Validate queue family at submit-time
Mark Lobodzinski [Tue, 9 Aug 2016 22:42:24 +0000 (16:42 -0600)]
layers: GH790, Validate queue family at submit-time

Command buffers must come from a command pool created with the same
queue family index as the queue they are submitted on.

Change-Id: Ifd1d73a09643c11852d807cb7edfc881827005dd

8 years agolayers: Adjust color/input attachment layout checks style
Chris Forbes [Tue, 9 Aug 2016 22:41:27 +0000 (10:41 +1200)]
layers: Adjust color/input attachment layout checks style

For consistency with depth

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodemos: Fix operator precedence problem with window width
Tony Barbour [Wed, 10 Aug 2016 19:39:36 +0000 (13:39 -0600)]
demos: Fix operator precedence problem with window width

Change-Id: Ief0b260528a6eb38788f88ec8a463307522849e8

8 years agotoolchain: Fix SPIRV-Headers update script
Cody Northrop [Fri, 5 Aug 2016 20:21:21 +0000 (14:21 -0600)]
toolchain: Fix SPIRV-Headers update script

Without specifying a branch, git pull fails.

8 years agolayers: Fix MapMem image layout validation
Tobin Ehlis [Thu, 4 Aug 2016 16:17:19 +0000 (10:17 -0600)]
layers: Fix MapMem image layout validation

When mapping memory, check all of the bound image ranges and for any
that overlap with the map range, make sure that the image layout is
either PREINITIALIZED or GENERAL.

8 years agolayers: Rename validateMemRange()
Tobin Ehlis [Thu, 4 Aug 2016 15:33:02 +0000 (09:33 -0600)]
layers: Rename validateMemRange()

This function is only used in MapMemory case so renamed to
ValidateMapMemRange() and added a header comment to make use
more clear.

8 years agolayers: Rename DEVICE_MEM_INFO struct members
Tobin Ehlis [Thu, 4 Aug 2016 14:03:32 +0000 (08:03 -0600)]
layers: Rename DEVICE_MEM_INFO struct members

Update names from camelcase to lowercase w/ "_" as we're slowly migrating
to that uniform style

8 years agolayers: Remove image member from DEVICE_MEM_INFO
Tobin Ehlis [Thu, 4 Aug 2016 13:53:46 +0000 (07:53 -0600)]
layers: Remove image member from DEVICE_MEM_INFO

The image member is broken and was superceded by objBindings which track
all objects bound to a single memory allocation.

This is also temporarily disabling a check for image layout when mapping
memory, but that check was broken and will be fixed in subsequent CL.

8 years agotests: Remove refs to device layers in tests + framework
Tony Barbour [Mon, 8 Aug 2016 22:06:56 +0000 (16:06 -0600)]
tests: Remove refs to device layers in tests + framework

Change-Id: I0ad12f7be17180688bd77168ba086b2b804f1637

8 years agolayers: Account for read-only depthstencil attachments in ValidateLayout
Chris Forbes [Mon, 8 Aug 2016 20:17:14 +0000 (08:17 +1200)]
layers: Account for read-only depthstencil attachments in ValidateLayout

The depth stencil attachment can be DEPTH_STENCIL_READ_ONLY_OPTIMAL.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Update validation layer details doc
Mark Lobodzinski [Fri, 5 Aug 2016 18:05:16 +0000 (12:05 -0600)]
layers: Update validation layer details doc

Added new image test for undefined format in CreateRenderPass
attachment description and updated notes for missing tests.

Change-Id: I6a928213da8dc86d59a33a704cbbec8bd3cfbd45

8 years agotests: Add test for undefined format check
Mark Lobodzinski [Fri, 5 Aug 2016 17:47:16 +0000 (11:47 -0600)]
tests: Add test for undefined format check

Test validation of an undefined format used in an attachment
description.

Change-Id: I22ef44991d4e01741ee04b79e2950e44a6a65afc

8 years agolayers: LX578, Add CreateRenderPass format check
Mark Lobodzinski [Fri, 5 Aug 2016 17:30:15 +0000 (11:30 -0600)]
layers: LX578, Add CreateRenderPass format check

Validate that AttachmentDescription.Format is not UNDEFINED.

Change-Id: Id348905aadfdc552c3b674a5752cdbc350022d8e

8 years agolayers: Add minor Image::CreateRenderPass updates
Mark Lobodzinski [Fri, 5 Aug 2016 17:20:21 +0000 (11:20 -0600)]
layers: Add minor Image::CreateRenderPass updates

Combined some repeated for-loops, code standards fixups, etc., in
the image layer.

Change-Id: I3952691d392898ce3c8fa7cc0a6762a40d06220d

8 years agodemos: Fix ifdefs to allow compilation without XLIB
Tony Barbour [Mon, 8 Aug 2016 17:04:17 +0000 (11:04 -0600)]
demos: Fix ifdefs to allow compilation without XLIB

Change-Id: I3fbed70e842bf327437d77f56cd0fa7848ab5d19

8 years agotests: Add ColorBlendLogicOpTests
Tobin Ehlis [Tue, 19 Jul 2016 19:25:12 +0000 (13:25 -0600)]
tests: Add ColorBlendLogicOpTests

This is a dual-purpose test. If the underlying device supports logicOp,
then attempt to use an invalid logicOp and verify that an error is flagged.
If the device doesn't support logicOp, attempt to use it and verify that
the correct error is flagged.

Also update documentation.

8 years agotests: Add IndexBufferNotBound test
Tobin Ehlis [Tue, 19 Jul 2016 17:22:29 +0000 (11:22 -0600)]
tests: Add IndexBufferNotBound test

Attempt and indexed draw with no index buffer bound.

8 years agolayers: Exclude index buffer from CBSTATUS_ALL mask
Tobin Ehlis [Tue, 19 Jul 2016 17:20:24 +0000 (11:20 -0600)]
layers: Exclude index buffer from CBSTATUS_ALL mask

The CBSTATUS_ALL mask is set to default all dynamic state to static in the
PSO. The index buffer doesn't fall under the other dynamic state umbrella
so excluding it from the CBSTATUS_ALL mask.

8 years agotests: Add FramebufferIncompatible test
Tobin Ehlis [Tue, 19 Jul 2016 16:50:30 +0000 (10:50 -0600)]
tests: Add FramebufferIncompatible test

Test where secondary command buffer has different framebuffer than
primary command buffer, which is a violation.
Update documentation.

8 years agotest: Minor clean-up
Tobin Ehlis [Tue, 19 Jul 2016 16:49:32 +0000 (10:49 -0600)]
test: Minor clean-up

Add TEST_DESCRIPTION() to ExecuteCommandsPrimaryCB test.

8 years agolayers: Remove duplicate framebuffer incompatible check
Tobin Ehlis [Tue, 19 Jul 2016 16:45:24 +0000 (10:45 -0600)]
layers: Remove duplicate framebuffer incompatible check

The existing DRAWSTATE_FRAMEBUFFER_INCOMPATIBLE check was a duplicate
of a check performed a few lines earlier in the validateFramebuffer()
function.
Update the check in that function to use the DRAWSTATE_FRAMEBUFFER_INCOMPATIBLE
enum and remove the duplicate check.

8 years agodemos: Fix cube to handle >1 event per frame
Tony Barbour [Fri, 5 Aug 2016 20:55:20 +0000 (14:55 -0600)]
demos: Fix cube to handle >1 event per frame

Change-Id: I6532f75f285b7428993da9314e128bfe5e476829

8 years agodemos: Fix Android build on OSX and Windows
Cody Northrop [Fri, 5 Aug 2016 18:30:44 +0000 (12:30 -0600)]
demos: Fix Android build on OSX and Windows

8 years agotests: Remove duplicate pNext test
Dustin Graves [Wed, 20 Jul 2016 19:41:21 +0000 (13:41 -0600)]
tests: Remove duplicate pNext test

After adjustment for new extension structures, the
VkLayerTest.InvalidStructPNext vkAllocateMemory and
vkCreateGraphicsPipelines test cases both test the same
validation error.  The larger vkCreateGraphicsPipeline test
case has been removed.

Change-Id: Idafd8360ad8c5b33727935ba3c696ee9abaaa073

8 years agodemos: Flip cube texture on android
Mike Stroyan [Thu, 4 Aug 2016 17:20:14 +0000 (11:20 -0600)]
demos: Flip cube texture on android

Flip the cube texture on android to track commit cb7f374.
Recreate lunarg.ppm.h from lunarg.ppm using xxd.
xxd -g 1 -c 12 -i lunarg.ppm > android/include/lunarg.ppm.h

8 years agolayers: Reenable fix for DS layout transitions
Mark Lobodzinski [Fri, 5 Aug 2016 15:38:18 +0000 (09:38 -0600)]
layers: Reenable fix for DS layout transitions

Fix for GH650, plus added fix for cube/tri.

Change-Id: I66c2332c30eb34a0f022c033efd9b1c5b8284c32

8 years agoGH 818: Improve swapchain error for vkCreateSwapchainKHR()
Ian Elliott [Fri, 5 Aug 2016 15:08:30 +0000 (09:08 -0600)]
GH 818: Improve swapchain error for vkCreateSwapchainKHR()

When the the application calls vkCreateSwapchainKHR(), the
pCreateInfo->surface used must have been previously checked as supported,
by calling vkGetPhysicalDeviceSurfaceSupportKHR().  The error message needed
to be more clear about this.

8 years agobuild: pr787 - CMAKE_INSTALL_PREFIX default
davidhubbard [Thu, 21 Jul 2016 22:11:59 +0000 (15:11 -0700)]
build: pr787 - CMAKE_INSTALL_PREFIX default

CMAKE_INSTALL_PREFIX default is /usr/local on unix

In order to build with a custom CMAKE_INSTALL_PREFIX, the line
set (CMAKE_INSTALL_PREFIX "") must be removed.

CMake set will overwrite anything specified on the command
line with cmake -DCMAKE_INSTALL_PREFIX.

Change-Id: I3bc905b4ad8fb08917e500e4987eb0277ba74a40

8 years agowinsdk: Make installer version programmable
Lenny Komow [Thu, 4 Aug 2016 16:32:27 +0000 (10:32 -0600)]
winsdk: Make installer version programmable

8 years agolayers: Update string concatenation in struct_string_helper_cpp
Tobin Ehlis [Wed, 3 Aug 2016 22:51:43 +0000 (16:51 -0600)]
layers: Update string concatenation in struct_string_helper_cpp

For structs with many fields, the generation of the final string representation
created by vk_struct_string_helper_cpp.h was getting obscene. The final string
concatentation for VkPhysicalDeviceFeatures exceeded 3000 cols and was crashing
clang.
This change builds the final string in a number of steps rather than trying to
do it all on a single line.

8 years agoloader: support manifests in XDG locations
John Drinkwater [Mon, 1 Aug 2016 16:00:00 +0000 (17:00 +0100)]
loader: support manifests in XDG locations

Some users set the environment variable XDG_DATA_HOME to relocate
~/.local/share/ to a more friendly location and so it is not wise to
look solely at that location.

This change adds basic support for that env var without changing the
behaviour for typical users. If XDG_DATA_HOME is defined, the loader
checks XDG_DATA_HOME/vulkan/..., if HOME is defined the loader will
check HOME/.local/share/vulkan/..., and with neither it skips looking
for user manifests.

loader_get_manifest_files() now takes a relative location inside the
config path eg `/vulkan/implicit_layer.d` and appends that onto the
preferred location.

vk_loader_platform.h Linux defines got minor adjustments to support this
change, with an added bonus of being more readable.

Change-Id: I44e8a99f2a984f94dc33cdda122e6c417d3a3653

8 years agolayers: Fix function interception list for param validation
Chris Forbes [Thu, 4 Aug 2016 03:59:38 +0000 (15:59 +1200)]
layers: Fix function interception list for param validation

A bunch of things were missing here.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Disable previous fix for DS layout transitions
Tobin Ehlis [Thu, 4 Aug 2016 02:30:07 +0000 (20:30 -0600)]
layers: Disable previous fix for DS layout transitions

Fix to always transition both depth and stencil aspects for DS images
is causing errors on cube and tri. Disabling the fix and test for now
to avoid unwanted false positives.

8 years agotests: Modify ErrorMonitor for warn behavior
Mark Lobodzinski [Wed, 3 Aug 2016 20:04:26 +0000 (14:04 -0600)]
tests: Modify ErrorMonitor for warn behavior

Using ExpectSuccess() is now configurable for custom combinations
of debug flags.

Change-Id: Ic0917cfa46fc15207d265d392020aadf2f66b675

8 years agotests: GH650, Add test for D/S layout issue
Tony Barbour [Tue, 2 Aug 2016 21:39:33 +0000 (15:39 -0600)]
tests: GH650, Add test for D/S layout issue

Added DepthStencilLayoutTransitionForDepthOnlyImageview test to check
that using a depth- or stencil-only imageview is validated correctly.

Change-Id: I427fbbea1cee06414c94e16abf094d6bff95c6af

8 years agotests: GH650, Add no-layout imageObj init
Tony Barbour [Tue, 2 Aug 2016 19:04:47 +0000 (13:04 -0600)]
tests: GH650, Add no-layout imageObj init

Changed the framework to add option of creating image without a
baked in layout.

Change-Id: Ie748779bd5b3c8392c4b6bfa508f775858b614d1

8 years agolayers: GH650, Fix D/S image layout validation
Mark Lobodzinski [Mon, 1 Aug 2016 21:51:39 +0000 (15:51 -0600)]
layers: GH650, Fix D/S image layout validation

When an imageView of a depth/stencil image is used as a depth/stencil
framebuffer attachment, the aspectMask is ignored and both depth and
stencil image subresources are used. Validation was throwing errors
as only the specified aspectMask transition was tracked.

Change-Id: I4f45eec74040448ba3ed52b07268fab3b3cb9318

8 years agolayers: Check vtx buffer binding
Tobin Ehlis [Wed, 3 Aug 2016 15:59:17 +0000 (09:59 -0600)]
layers: Check vtx buffer binding

Need to check vtx buffer binding based on binding values set in
pVertexBindingDescriptions array if present.

8 years agoFix Android build for mips64: NULL -> VK_NULL_HANDLE
Ian Elliott [Wed, 3 Aug 2016 20:57:11 +0000 (14:57 -0600)]
Fix Android build for mips64: NULL -> VK_NULL_HANDLE

This should affect other architectures as well.  A handle can't be assigned to
NULL (may get 32-64 type issues).  Must set a Vulkan handle to VK_NULL_HANDLE.

8 years agotests: Fix OT error in commandpool test
Mark Lobodzinski [Wed, 3 Aug 2016 20:08:40 +0000 (14:08 -0600)]
tests: Fix OT error in commandpool test

Change-Id: I2b505bed3a9ebb3d20c2df6189be00696a480f54

8 years agodemos: Remove the need for QueueWaitIdle in cube
Tony Barbour [Thu, 28 Jul 2016 18:01:45 +0000 (12:01 -0600)]
demos: Remove the need for QueueWaitIdle in cube

Change-Id: Iddccf0d672632ad7f0821fb98c685c944c2b8b77