platform/upstream/Vulkan-Tools.git
8 years agoloader: Move SOVERSION to version 1.0.28
Mark Lobodzinski [Tue, 27 Sep 2016 14:27:59 +0000 (08:27 -0600)]
loader: Move SOVERSION to version 1.0.28

Change-Id: I4e011b3b37f805fde1100cf519042ea242c680d0

8 years agolayers: Move Windows json files to version 1.0.28
Mark Lobodzinski [Tue, 27 Sep 2016 14:27:08 +0000 (08:27 -0600)]
layers: Move Windows json files to version 1.0.28

s Please enter the commit message for your changes. Lines starting

Change-Id: I292aba8b4b4df46d60e3c8d4752e5fb9ccee1217

8 years agolayers: Move Linux json files to version 1.0.28
Mark Lobodzinski [Tue, 27 Sep 2016 14:26:40 +0000 (08:26 -0600)]
layers: Move Linux json files to version 1.0.28

Change-Id: I51e3624312bd83a0b6f440638088ef362d7f7ee5

8 years agoheader: Move vk.xml to version 1.0.28
Mark Lobodzinski [Tue, 27 Sep 2016 14:25:27 +0000 (08:25 -0600)]
header: Move vk.xml to version 1.0.28

Change-Id: If860d6d0df348fc758f3b59429523cd5ee2db95f

8 years agoheader: Move vk_platform.h to version 1.0.28
Mark Lobodzinski [Thu, 29 Sep 2016 16:47:27 +0000 (10:47 -0600)]
header: Move vk_platform.h to version 1.0.28

Change-Id: I3bc47016e3be0c9870f05254b02718099d990eaf

8 years agoheader: Move vulkan.h to version 1.0.28
Mark Lobodzinski [Tue, 27 Sep 2016 14:23:59 +0000 (08:23 -0600)]
header: Move vulkan.h to version 1.0.28

Change-Id: I346877d18a2600e114ebee844fb5b5055c0ea5c5

8 years agolayers: Complain about subpass mismatch between CB and pipeline
Chris Forbes [Wed, 28 Sep 2016 02:19:39 +0000 (15:19 +1300)]
layers: Complain about subpass mismatch between CB and pipeline

Fixes #933.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Use cmd buffer as src object in callback
Chris Forbes [Tue, 27 Sep 2016 04:14:46 +0000 (17:14 +1300)]
layers: Use cmd buffer as src object in callback

One less TODO.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodemos: Remove tri from Android build
Cody Northrop [Thu, 29 Sep 2016 19:55:08 +0000 (13:55 -0600)]
demos: Remove tri from Android build

8 years agodemos: Set srcAccessMask correctly for present barriers
Tony Barbour [Thu, 29 Sep 2016 17:36:49 +0000 (11:36 -0600)]
demos: Set srcAccessMask correctly for present barriers

Change-Id: I58cd90304ad4bd4e3c5c1622002bbc46fcf66cd9

8 years agocmake: Fix whitespace
Mark Lobodzinski [Thu, 29 Sep 2016 16:26:36 +0000 (10:26 -0600)]
cmake: Fix whitespace

Change-Id: Ia2d35a87c14c0c73bc26588694b398e04a191203

8 years agobuild: gh27 Allow builds in paths with spaces
Karl Schultz [Wed, 28 Sep 2016 00:38:02 +0000 (18:38 -0600)]
build: gh27 Allow builds in paths with spaces

Add quotes around shell var expansions in the update_external_sources scripts.

For Windows, remove the cmake directives to add a linker option for the DEF
files.  These were redundant with the DEF files getting added via the
cmake add_library() directive.  They were also causing difficult-to-fix
problems with paths that have spaces in them.

Change-Id: I741bac31bbf27deae59031b6aa916c6ab48383a6

8 years agolayers: Added flags for in_use checks
Tobin Ehlis [Wed, 28 Sep 2016 20:25:44 +0000 (14:25 -0600)]
layers: Added flags for in_use checks

Added object_in_use flag to disable all in_use checks.
Added destroy_buffer_view flag to disable validation checks at
DestroyBufferView() time.

8 years agolayers: Update DestroyBufferView to use Pre/Post paradigm
Tobin Ehlis [Wed, 28 Sep 2016 20:01:13 +0000 (14:01 -0600)]
layers: Update DestroyBufferView to use Pre/Post paradigm

Add PreCallValidate* and PostCallRecord* functions to DestroyBufferView
according to long-term core_validation architecture plans.

8 years agolayers: Add binding between cmd buffer and bufferView
Tobin Ehlis [Wed, 28 Sep 2016 13:12:28 +0000 (07:12 -0600)]
layers: Add binding between cmd buffer and bufferView

For a texel descriptor update, add binding between bufferView and the
command buffer as well as between underlying buffer and command buffer.

8 years agolayers: Add in-use detection for VkBufferView
Tobin Ehlis [Mon, 26 Sep 2016 23:38:00 +0000 (17:38 -0600)]
layers: Add in-use detection for VkBufferView

When VkBufferView is destroyed, flag error if in-use and mark any
bound cmd buffers as invalid.

8 years agodemos: Remove tri demo
Tony Barbour [Wed, 21 Sep 2016 20:38:50 +0000 (14:38 -0600)]
demos: Remove tri demo

Removing tri demo for maintenance reasons.  Cube should be the demo
to go to for examples of good Vulkan

Change-Id: I4442a1882b5c168cfe88501eccc41a554ae4d026

8 years agolayers: Add bool to guard command buffer state check
Tobin Ehlis [Tue, 27 Sep 2016 23:42:58 +0000 (17:42 -0600)]
layers: Add bool to guard command buffer state check

This is the first check-in demonstrating the boolean model to allow validation
checks to be disabled. Going forward we'd like to guard all checks in such
bools which can then be set based on VkValidationCheckEXT enum values passed
in at vkCreateInstance() time.

In the course of adding this noticed a bug where instance_state was not getting
initialized in device layer_data at CreateDevice time. Fixed this bug.

8 years agolayers: Indicate correct source for validateCommandBufferState() error
Tobin Ehlis [Tue, 27 Sep 2016 19:10:33 +0000 (13:10 -0600)]
layers: Indicate correct source for validateCommandBufferState() error

Fixes #982

Instead of hard-coding vkQueueSubmit, take a parameter to clarify if the error
originates from vkQueueSubmit() or vkCmdExecuteCommands()

8 years agodocs: Add CubeWithLayers to Android section
Cody Northrop [Tue, 27 Sep 2016 17:48:14 +0000 (11:48 -0600)]
docs: Add CubeWithLayers to Android section

8 years agodemos: Clean up logging for Android
Cody Northrop [Tue, 27 Sep 2016 16:50:57 +0000 (10:50 -0600)]
demos: Clean up logging for Android

8 years agodemos: Enable validation for Android cube
Cody Northrop [Tue, 27 Sep 2016 03:05:00 +0000 (21:05 -0600)]
demos: Enable validation for Android cube

8 years agodemos: Add APK with layers to cube
Cody Northrop [Mon, 26 Sep 2016 23:53:00 +0000 (17:53 -0600)]
demos: Add APK with layers to cube

8 years agoloader: gh989 - Fix incorrect array index
Jan-Harald Fredriksen [Wed, 28 Sep 2016 10:10:24 +0000 (12:10 +0200)]
loader: gh989 - Fix incorrect array index

An inner array loop was using an incorrect index to access the
appropriate layer in instance extension validation.

Change-Id: I27606fb32049bb531131ca29357d79491e3f96a7

8 years agodemos: s/X11_INCLUDE_DIRS/X11_INCLUDE_DIR/ typo
Robert Bragg [Tue, 27 Sep 2016 20:10:23 +0000 (21:10 +0100)]
demos: s/X11_INCLUDE_DIRS/X11_INCLUDE_DIR/ typo

Signed-off-by: Robert Bragg <robert.bragg@intel.com>
8 years agolayers: Convert RENDER_PASS_NODE::pCreateInfo to use safe struct
Chris Forbes [Mon, 26 Sep 2016 23:03:31 +0000 (12:03 +1300)]
layers: Convert RENDER_PASS_NODE::pCreateInfo to use safe struct

Gets rid of a memory leak, and simplifies the code.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Don't accidentally copy safe_VkFramebufferCreateInfo
Chris Forbes [Mon, 26 Sep 2016 23:03:04 +0000 (12:03 +1300)]
layers: Don't accidentally copy safe_VkFramebufferCreateInfo

This isn't cheap.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Don't add VK_SUBPASS_EXTERNAL edges to subpass DAG.
Chris Forbes [Mon, 26 Sep 2016 21:54:58 +0000 (10:54 +1300)]
layers: Don't add VK_SUBPASS_EXTERNAL edges to subpass DAG.

We don't use them, and handling them safely complicates other code that
works with the DAG.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Trim out some more old MT renderpass junk
Chris Forbes [Mon, 26 Sep 2016 04:04:41 +0000 (17:04 +1300)]
layers: Trim out some more old MT renderpass junk

- RENDER_PASS_NODE::attachments[i].attachment was always i.
- This whole structure is noise; we can use the VkAttachmentDescription
  directly.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Remove unnecessary constructors from new _STATE classes
Chris Forbes [Mon, 26 Sep 2016 02:23:32 +0000 (15:23 +1300)]
layers: Remove unnecessary constructors from new _STATE classes

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Tweak naming of enums moved from SwapChain to CV
Chris Forbes [Mon, 26 Sep 2016 02:18:57 +0000 (15:18 +1300)]
layers: Tweak naming of enums moved from SwapChain to CV

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Move image-not-acquired etc from swapchain to core validation
Chris Forbes [Thu, 22 Sep 2016 06:34:20 +0000 (18:34 +1200)]
layers: Move image-not-acquired etc from swapchain to core validation

Now that Core Validation tracks the acquisition state of every swapchain
image, we can do this.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Add tracking of acquired state to Core Validation
Chris Forbes [Thu, 22 Sep 2016 05:11:06 +0000 (17:11 +1200)]
layers: Add tracking of acquired state to Core Validation

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Add IMAGE_NODE::acquired flag
Chris Forbes [Thu, 22 Sep 2016 04:49:47 +0000 (16:49 +1200)]
layers: Add IMAGE_NODE::acquired flag

This is necessary for moving the image ownership stuff across from
swapchain

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Move ACQUIRE_NO_SYNC check from Swapchain to Core Validation
Chris Forbes [Thu, 22 Sep 2016 04:40:27 +0000 (16:40 +1200)]
layers: Move ACQUIRE_NO_SYNC check from Swapchain to Core Validation

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoloader: gh971 EnumPhysDev return VK_INCOMPLETE
Mark Young [Mon, 26 Sep 2016 17:38:46 +0000 (11:38 -0600)]
loader: gh971 EnumPhysDev return VK_INCOMPLETE

vkEnumeratePhysicalDevices should return VK_INCOMPLETE if the
following conditions are met:
a) pPhysicalDeviceCount < number of physical devices available
b) pPhysicalDevices != NULL
The code was actually in place, but was not getting hit.

Change-Id: I725fec5e57239f990590d9e447bb057ebc3502a1

8 years agobuild: Enable parallel windows build
Mike Stroyan [Wed, 21 Sep 2016 17:19:07 +0000 (11:19 -0600)]
build: Enable parallel windows build

8 years agobuild: Make windows build of demos parallel build safe
Mike Stroyan [Thu, 22 Sep 2016 20:55:16 +0000 (14:55 -0600)]
build: Make windows build of demos parallel build safe

Use direct output to SPIRV file names to prevent collisions.

8 years agobuild: Fix parallel build of layers
Mike Stroyan [Fri, 16 Sep 2016 15:45:14 +0000 (09:45 -0600)]
build: Fix parallel build of layers

Change layer dependencies to prevent collisions of scripts creating headers.
Use dependency on one custom target for each group of headers built by a custom command.
The layers json targets need to depend on the layers targets.
They expect to copy into a directory created by those targets.
Make dependency of vk_safe_struct.cpp indirect through generate_vk_layer_helpers.
That will wait for a single build of the generated files.

8 years agobuild: Fix ImageMagick_Magick++ search
Mike Stroyan [Tue, 20 Sep 2016 15:08:18 +0000 (09:08 -0600)]
build: Fix ImageMagick_Magick++ search

One cmake test was looking at ImageMagick_MagickWand_INCLUDE_DIR
instead of ImageMagick_Magick++_INCLUDE_DIR

8 years agobuild: UNSET cache variables for FIND_IMAGEMAGICK_API
Mike Stroyan [Tue, 20 Sep 2016 15:05:28 +0000 (09:05 -0600)]
build: UNSET cache variables for FIND_IMAGEMAGICK_API

The way that the ImageMagick component search calls find_path
multiple times with the same variable but different names
does not expect old cache values in the variable.

8 years agolayers: Remove spurious using BASE_NODE::*.
Chris Forbes [Thu, 22 Sep 2016 02:55:13 +0000 (14:55 +1200)]
layers: Remove spurious using BASE_NODE::*.

Inheritance is all public (except for FRAMEBUFFER_NODE, which ought to
have been), and there's no template inheritance involved, so these
didn't do anything interesting.

Fix FRAMEBUFFER_NODE to publicly inherit BASE_NODE, and drop the noise
everywhere.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Get rid of some junk in RENDER_PASS_NODE::ctor
Chris Forbes [Thu, 22 Sep 2016 06:53:59 +0000 (18:53 +1200)]
layers: Get rid of some junk in RENDER_PASS_NODE::ctor

Many moons ago, ShaderChecker used this state. Now, it digs directly in
the CreateInfo, so there are no clients. Nuke it.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Explicitly delete IMAGE_NODE, BUFFER_NODE copy constructors
Chris Forbes [Thu, 22 Sep 2016 06:51:58 +0000 (18:51 +1200)]
layers: Explicitly delete IMAGE_NODE, BUFFER_NODE copy constructors

Previously we defined copy constructors that would almost certainly lead
to bugs if these objects were copied (they copied the atomic values,
etc). The layer doesn't copy these, just disallow it.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Fix VerifyCopyUpdateContents on combined image sampler descriptors
Alex Smith [Fri, 23 Sep 2016 11:18:51 +0000 (12:18 +0100)]
layers: Fix VerifyCopyUpdateContents on combined image sampler descriptors

A missing break at the end of the ImageSampler case results in falling
through to the Image case, leading to spurious validation errors such as:

  vkUpdateDescriptorsSets() failed copy update from Descriptor Set 0x108
  to Descriptor Set 0x137 with error: Attempted copy update to image
  descriptor failed due to: Invalid VkImageView: 0x100000000

8 years agolayers: Prevent reading uninitialized "count" when validating array parameters
Józef Kucia [Fri, 23 Sep 2016 10:45:04 +0000 (12:45 +0200)]
layers: Prevent reading uninitialized "count" when validating array parameters

8 years agoandroid: Add Android and C++ support to a couple files
Cody Northrop [Thu, 22 Sep 2016 20:39:16 +0000 (14:39 -0600)]
android: Add Android and C++ support to a couple files

These are needed downstream in VulkanTools for Android support.

8 years agodemos: Enable arm64 build of Smoke
Cody Northrop [Thu, 22 Sep 2016 19:55:49 +0000 (13:55 -0600)]
demos: Enable arm64 build of Smoke

8 years agodemos: Update Smoke permissions for trace/replay
Cody Northrop [Thu, 22 Sep 2016 19:42:22 +0000 (13:42 -0600)]
demos: Update Smoke permissions for trace/replay

8 years agodemos: Fix Smoke build for Android
Cody Northrop [Thu, 22 Sep 2016 17:08:37 +0000 (11:08 -0600)]
demos: Fix Smoke build for Android

It doesn't appear that this ever worked.

8 years agodemos: Update gradle properties for smoke
Cody Northrop [Thu, 22 Sep 2016 15:42:23 +0000 (09:42 -0600)]
demos: Update gradle properties for smoke

8 years agodemos: Update smoke build script to be automatable
Cody Northrop [Thu, 22 Sep 2016 14:18:52 +0000 (08:18 -0600)]
demos: Update smoke build script to be automatable

8 years agotoolchain: Use multiple processes to build glslang
Cody Northrop [Thu, 22 Sep 2016 19:32:04 +0000 (13:32 -0600)]
toolchain: Use multiple processes to build glslang

8 years agolayers: Distinguish never-bound from un-bound memory cases
Tobin Ehlis [Thu, 22 Sep 2016 16:52:00 +0000 (10:52 -0600)]
layers: Distinguish never-bound from un-bound memory cases

Fixes #964

Added special MEMORY_UNBOUND handle (0xF..FE) that indicates that memory
bound to an object has been freed. When attempting to bind memory or
checking for bound memory, distinguish the never-bound case from the
memory un-bound case.

For sparse binding case allow for memory to be re-bound.

Update tests to account for new error messages.

There's a sliver of exposure here if an actual memory handle is MEMORY_UNBOUND.
We could remove that exposure by never having unique_objects return MEMORY_UNBOUND
as a handle. I believe the exposure is small enough that we don't need to do that,
but am open to other opinions.

8 years agodemos: Change cube to use FIFO present mode
Tony Barbour [Wed, 21 Sep 2016 19:10:56 +0000 (13:10 -0600)]
demos: Change cube to use FIFO present mode

And throttle using fences

Change-Id: I13cd622f9a401fdb44bf7b74343589b70e340b77

8 years agodemos: Update Android documentation
Cody Northrop [Thu, 22 Sep 2016 13:41:08 +0000 (07:41 -0600)]
demos: Update Android documentation

8 years agodemos: Give Cube and Tri distinct app names
Cody Northrop [Thu, 22 Sep 2016 13:32:22 +0000 (07:32 -0600)]
demos: Give Cube and Tri distinct app names

8 years agodemos: Clean up APK creation for cube and tri
Cody Northrop [Thu, 22 Sep 2016 13:22:28 +0000 (07:22 -0600)]
demos: Clean up APK creation for cube and tri

Instead of moving manifest files, run the following commands:

  android update project -s -p . -t "android-23"
  ant -buildfile cube debug
  ant -buildfile tri debug

And the APKs can coexist:

  ./cube/bin/NativeActivity-debug.apk
  ./tri/bin/NativeActivity-debug.apk

8 years agolayers: Clean up no memory bound checks
Tobin Ehlis [Wed, 21 Sep 2016 21:09:45 +0000 (15:09 -0600)]
layers: Clean up no memory bound checks

When memory is freed make sure to clear bindings in associated objects.

Also clean up reporting of no memory bound errors. Old assumption was that
no memory had every been bound, but it's also possible to hit such errors
if the bound memory was freed prior to operation of interest.
In descriptor error cases where no memory is bound, add a final error string
as clarification since descriptor errors are built up of multiple strings
with details from each function call in the tree.

8 years agolayers: Verify memory is bound to images used to update descriptors
Tobin Ehlis [Wed, 21 Sep 2016 15:19:15 +0000 (09:19 -0600)]
layers: Verify memory is bound to images used to update descriptors

Fixes #663

For vkUpdateDescriptorSets() calls that include an image, verify that memory is bound to the image.

8 years agolayers: A few minor clean-ups from code review
Tobin Ehlis [Thu, 22 Sep 2016 13:30:05 +0000 (07:30 -0600)]
layers: A few minor clean-ups from code review

Better use of auto and killing some unneeded code.

8 years agolayers: Add in-use check at DestroyImage() time
Tobin Ehlis [Wed, 21 Sep 2016 20:28:42 +0000 (14:28 -0600)]
layers: Add in-use check at DestroyImage() time

Flag error if an in-use image is destroyed.
Also clean up a couple minor issues related to binding objects to command buffer.

8 years agolayers: Add in-use check for renderPass
Tobin Ehlis [Mon, 19 Sep 2016 20:20:37 +0000 (14:20 -0600)]
layers: Add in-use check for renderPass

At DestroyRenderPass() time verify that renderPass is not in-use.

8 years agolayer: Add in-use validation for imageView
Tobin Ehlis [Mon, 19 Sep 2016 20:02:58 +0000 (14:02 -0600)]
layer: Add in-use validation for imageView

Bind imageView from a descriptor to the command buffer at CmdBindDescriptorSets
time and check for an in-use imageView at DestroyImageView time.

Also use new AddCommandBufferBindingImageView() helper to bind children of
framebuffer in AddFrameBufferBinding().

8 years agolayers: Add in-use check for imageView
Tobin Ehlis [Mon, 19 Sep 2016 19:10:37 +0000 (13:10 -0600)]
layers: Add in-use check for imageView

Add DestroyImageView time, make sure imageView is not in use.

8 years agolayers: Add binding for framebuffer children
Tobin Ehlis [Wed, 14 Sep 2016 21:26:09 +0000 (15:26 -0600)]
layers: Add binding for framebuffer children

When BeginCommandBuffer and CmdBeginRenderPass are called, need to bind
not only the framebuffer, but all of the framebuffer's children objects
to the command buffer.
This includes the imageViews that are in the attachments as well as their
children and the renderpass.
Added this binding and included IMAGE_VIEW_STATE* in framebuffer
attachment struct for simplicity when creating binding.

8 years agolayers: Add support code to handle in_use for missing objects
Tobin Ehlis [Wed, 14 Sep 2016 17:21:55 +0000 (11:21 -0600)]
layers: Add support code to handle in_use for missing objects

Add case block to in-use Increment/Decrement functions to handle the missing
object types that may be bound to a command buffer. The actual bindings for
these missing types will be added in a future commit.
Here are the types that were added:
VkBufferView
VkImageView
VkDescriptorPool
VkCommandPool
VkFramebuffer
VkRenderPass
VkDeviceMemory

Also added new error enums for all of these type except RENDERPASS which already
had an appropriate error enum.

Unify object BASE_NODE look-up for removeCommandBufferBinding() and
DecrementBoundResources() to use common GetStateStructPtrFromObject() function.

Finally, had to update the state-wrapping class for DescriptorPool, DeviceMemory
and RenderPass to derive from BASE_NODE so that in_use can be tracked.

8 years agolayers: Update BufferView state tracking
Tobin Ehlis [Wed, 14 Sep 2016 14:12:08 +0000 (08:12 -0600)]
layers: Update BufferView state tracking

Create BUFFER_VIEW_STATE class to hold VkBufferViewCreateInfo and update related
state tracking. This class derives from BASE_NODE in preparation for tracking
in_use for BufferViews consistent to other object in_use tracking.

8 years agolayers: Update ImageView state tracking
Tobin Ehlis [Wed, 14 Sep 2016 14:02:49 +0000 (08:02 -0600)]
layers: Update ImageView state tracking

Create IMAGE_VIEW_STATE class to hold VkImageViewCreateInfo and update related
state tracking. This class derives from BASE_NODE in preparation for tracking
in_use for ImageViews consistent to other object in_use tracking.

8 years agolayers: Clean up in-use decrement for bound objects
Tobin Ehlis [Wed, 14 Sep 2016 13:01:11 +0000 (07:01 -0600)]
layers: Clean up in-use decrement for bound objects

Decrement in-use in a single location via ptr to BASE_NODE for each bound object.

8 years agolayers: Clean up in-use increment for bound objects
Tobin Ehlis [Wed, 14 Sep 2016 12:55:51 +0000 (06:55 -0600)]
layers: Clean up in-use increment for bound objects

Simplify code with a single error call and in_use increment based on common
base class.

8 years agolayers: Fix tracking of WSI fence retirement
Chris Forbes [Wed, 21 Sep 2016 01:36:19 +0000 (13:36 +1200)]
layers: Fix tracking of WSI fence retirement

Previously we'd note that the fence wasn't submitted to a queue, and so
never call RetireWorkOnQueue, which is the only thing that marked the
fence as retired. In the WSI fence case, we still aren't doing any
tracking of completion of the WSI operation (we should! image ownership
is easily fouled up!) but we can at least retire the fence.

Fixes #954.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Extract RetireFence helper from WaitForFences/GetFenceStatus.
Chris Forbes [Tue, 20 Sep 2016 23:18:30 +0000 (11:18 +1200)]
layers: Extract RetireFence helper from WaitForFences/GetFenceStatus.

This does the same thing in both places.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodemos: Use ownership barriers for separate queues in cube
Tony Barbour [Wed, 7 Sep 2016 22:07:56 +0000 (16:07 -0600)]
demos: Use ownership barriers for separate queues in cube

Change-Id: Ia3456405add6ea35b9cc774b2247e6f7d9a80768

8 years agodemos: Use queue search from spec example
Tony Barbour [Tue, 6 Sep 2016 17:40:12 +0000 (11:40 -0600)]
demos: Use queue search from spec example

To favor finding a queue that supports both graphics and present

Change-Id: I0223b0973b4244c006ade31c6515f149f9696ff8

8 years agoloader: More changes for gh181
Mark Young [Fri, 16 Sep 2016 16:18:42 +0000 (10:18 -0600)]
loader: More changes for gh181

With Piers' fix, another path was broke because we still needed
to intercept the call before it went to the ICD.  Now, with his
change and this change, all paths work.

Also, clean up some code based on comments from Ian and Courtney
reviews.

Finally, update docs to indicate behavior of new loader 3
interface with ICDs.

Change-Id: I2d3f962baffb21c1edeb93b132ffad40f298c8e7

8 years agoloader: Fixes for ICD vk{Create|Destroy}SurfaceKHR
Piers Daniell [Wed, 14 Sep 2016 17:24:36 +0000 (11:24 -0600)]
loader: Fixes for ICD vk{Create|Destroy}SurfaceKHR

Need to keep VkIcdSurface private to the loader.

The definition may conflict with some redefinitions of
VK_DEFINE_NON_DISPATCHABLE_HANDLE and it's not necessary to make public
anyway.

Change-Id: I30e166f0ecce2fd3ea36c745dc073b705973d75f

8 years agoloader: gh181 use ICD for SurfaceKHR
Mark Young [Tue, 28 Jun 2016 16:52:43 +0000 (10:52 -0600)]
loader: gh181 use ICD for SurfaceKHR

Use the ICD to create and destroy VkSurfaceKHR objects instead
of just performing the work in the ICD.  This only occurs if the ICD
exports the appropriate entry-points, and exposes version 3 of the
loader/icd interface.

Change-Id: I5e7bf9506318823c57ad75cf19d3f53fdfa6451e

8 years agounique_object: Remove unneccessary code.
Mark Young [Mon, 19 Sep 2016 20:25:33 +0000 (14:25 -0600)]
unique_object: Remove unneccessary code.

There is some duplication in querying the WSI extensions in the
unique_object layer.  Remove the duplication.

Change-Id: I2f240e8f801bd3d154fce8b1cbc486b62b5a50ee

8 years agoGH-951 Fixed consistency issue with mip size calculations
Gregory Mitrano [Mon, 19 Sep 2016 03:48:29 +0000 (23:48 -0400)]
GH-951 Fixed consistency issue with mip size calculations

8 years agoGH-951 - Improve validation for minImageTransferGranularity
Gregory Mitrano [Mon, 19 Sep 2016 01:54:49 +0000 (21:54 -0400)]
GH-951 - Improve validation for minImageTransferGranularity

Added missing BC1_RGBA formats to vk_format_is_compressed function
Added function in vk_layer_utils to get block sizes for compressed formats

8 years agolayers: Get rid of old CBSTATUS-based dynamic viewport and scissor
Chris Forbes [Fri, 16 Sep 2016 05:11:50 +0000 (17:11 +1200)]
layers: Get rid of old CBSTATUS-based dynamic viewport and scissor

These were superceded by the precise tracking of dynamic scissors and
viewports.

Fix up the tests to look for the precise errors, and get rid of the
broken clearing of static scissors & viewports, which triggered other
errors.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agobuild: FindImageMagick file needed updating.
Mark Young [Fri, 16 Sep 2016 16:21:31 +0000 (10:21 -0600)]
build: FindImageMagick file needed updating.

Incorrectly updated the one in VulkanTools insteda of the one
in LoaderAndValidationLayers.

Thanks to Arda for the catch (even though I originally thought
he messed up).

Change-Id: Ic60d68d9c17437c4c711a8b359a8ad9246537e30

8 years agolayers: Cleanup unexpected push_constants msgs
Karl Schultz [Tue, 13 Sep 2016 20:23:19 +0000 (14:23 -0600)]
layers: Cleanup unexpected push_constants msgs

Fix to core validation CreatePipelineLayout to change
a message from warning to error.
Fixes to PushConstants layer tests to fix unintended
validation errors and to avoid generating multiple
intentional errors in a single test.

Change-Id: I618d6e5aff55fa918da5bd81c47092174b266da1

8 years agolayers: Only save p-devices if call was successful
Tony Barbour [Tue, 13 Sep 2016 17:45:37 +0000 (11:45 -0600)]
layers: Only save p-devices if call was successful

Change-Id: Ife211b1b2dc97c5bab0d6e7b177ead6b1a6105d3

8 years agodemos: Give Android versions permissions for internet & read/write files
Ian Elliott [Thu, 1 Sep 2016 17:09:21 +0000 (11:09 -0600)]
demos: Give Android versions permissions for internet & read/write files

This is in support of RenderDoc (and other tracing libraries).  On Android,
these "native" applications must have permission to read/write files on the
Android filesystem so that a trace-capture library can write a trace file.
After building and installing the application, the following commands should be
run from a Linux shell, in order to truly grant those permissions (not normally
required for an Android Java-based app, with a GUI; but is required for these
shell-launched, native apps):

adb shell pm grant com.example.Cube android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant com.example.Cube android.permission.WRITE_EXTERNAL_STORAGE

8 years agodemos: Fix issue of making Vulkan calls from callback
Tony Barbour [Mon, 12 Sep 2016 20:02:43 +0000 (14:02 -0600)]
demos: Fix issue of making Vulkan calls from callback

Change-Id: I6fcb41cbcd13e8ce5ace6f857d7dd54bad48aa55

8 years agolayers: Require VkGraphicsPipelineCreateInfo::pDepthStencilState
Chris Forbes [Thu, 8 Sep 2016 05:55:54 +0000 (17:55 +1200)]
layers: Require VkGraphicsPipelineCreateInfo::pDepthStencilState

If the subpass uses a depth/stencil attachment and rasterization is not
disabled, then this structure must be present.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: tweak comments from review feedback
Chris Forbes [Mon, 12 Sep 2016 23:22:22 +0000 (11:22 +1200)]
layers: tweak comments from review feedback

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Don't do cross-stage validation if individual stages failed
Chris Forbes [Thu, 8 Sep 2016 23:26:20 +0000 (11:26 +1200)]
layers: Don't do cross-stage validation if individual stages failed

There are only crashes and nonsense down this path.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Don't bother continuing after missing entrypoint
Chris Forbes [Thu, 8 Sep 2016 23:23:39 +0000 (11:23 +1200)]
layers: Don't bother continuing after missing entrypoint

There's very little we can do here.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoloader: Fix compiler warning
Mark Young [Mon, 12 Sep 2016 17:55:10 +0000 (11:55 -0600)]
loader: Fix compiler warning

I had an unused variable left after some recent changes.

Change-Id: I934ea4a7410c6be9bbafe250bc09f38feb3d6f7c

8 years agobuild: Fix CMake coding error
Karl Schultz [Mon, 12 Sep 2016 20:09:03 +0000 (14:09 -0600)]
build: Fix CMake coding error

Need STREQUAL when compating strings.

Change-Id: Id65055d18af2c0bbd3e4959f21587e2ba9afa607

8 years agodemos: fix vulkaninfo warnings in display-only build
Karl Schultz [Mon, 12 Sep 2016 19:28:09 +0000 (13:28 -0600)]
demos: fix vulkaninfo warnings in display-only build

Change-Id: Iabc8edd7cd90f848d4957d005eb14c1094e94790

8 years agoFix, that display only build under Linux works
Norbert Nopper [Thu, 8 Sep 2016 07:31:36 +0000 (09:31 +0200)]
Fix, that display only build under Linux works

8 years agoloader: Fix another possible memory leak
Derrick Owens [Fri, 9 Sep 2016 19:49:07 +0000 (15:49 -0400)]
loader: Fix another possible memory leak

Added another cleanup case, just in case...

Change-Id: Ia6e09ce12c29314a1cce6b1cdcd72bdd7749f655

8 years agoloader: Fixed conformance memory leak.
Derrick Owens [Fri, 9 Sep 2016 19:45:13 +0000 (15:45 -0400)]
loader: Fixed conformance memory leak.

This fixes a memory leak found whilst running Khronos conformance with
more than 1 ICD installed.

Change-Id: I34ed978b2929c33d9e2c49cf633f09ada2788a92

8 years agowinsdk: Fix ConfigureRT.exe not being deleted
Lenny Komow [Fri, 9 Sep 2016 15:43:17 +0000 (09:43 -0600)]
winsdk: Fix ConfigureRT.exe not being deleted

8 years agoloader: Add back func calls
Mark Young [Fri, 9 Sep 2016 13:26:48 +0000 (07:26 -0600)]
loader: Add back func calls

Previously removed function calls in extension_create_instance
because I believed they were no longer needed.  I was incorrect.

Change-Id: Ibc63009f0038a413b7e1bc03225818b046a62352

8 years agolayers: make CmdClearAttachments messages errors again for now.
Chris Forbes [Fri, 9 Sep 2016 02:36:33 +0000 (14:36 +1200)]
layers: make CmdClearAttachments messages errors again for now.

There's some spec contradictions, captured in !488. For now, let's say
that these are errors. This commit can be reverted if !488's resolution
retains the noop behavior.

Signed-off-by: Chris Forbes <chrisforbes@google.com>