platform/upstream/Vulkan-LoaderAndValidationLayers.git
7 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.

7 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

7 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

7 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

7 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.

7 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

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

7 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

7 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

7 years agotests: Fix unexpected errors in InvalidMemoryAliasing
Tobin Ehlis [Thu, 22 Sep 2016 00:32:11 +0000 (18:32 -0600)]
tests: Fix unexpected errors in InvalidMemoryAliasing

Memory bindings are immutable so create a separate image2 to bind
to the second memory allocation instead of re-binding same image.

7 years agotests: Add DescriptorImageUpdateNoMemoryBound test
Tobin Ehlis [Wed, 21 Sep 2016 23:32:49 +0000 (17:32 -0600)]
tests: Add DescriptorImageUpdateNoMemoryBound test

Attempt to update an image descriptor that doesn't have memory bound.

7 years agotests: Update error monitor to handle multiple expected errors
Tobin Ehlis [Wed, 21 Sep 2016 23:32:26 +0000 (17:32 -0600)]
tests: Update error monitor to handle multiple expected errors

7 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.

7 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.

7 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.

7 years agotests: Add FramebufferImageInUseDestroyedSignaled test
Tobin Ehlis [Wed, 21 Sep 2016 20:33:41 +0000 (14:33 -0600)]
tests: Add FramebufferImageInUseDestroyedSignaled test

Create a framebuffer, bind it to cmd buffer as part of renderpass and then
destroy the child image while in-flight to verify that correct error is
triggered.

7 years agotests: Make initial renderpass color attachment image layout UNDEFINED
Tobin Ehlis [Wed, 21 Sep 2016 20:31:52 +0000 (14:31 -0600)]
tests: Make initial renderpass color attachment image layout UNDEFINED

This is more flexible for handling various initial image layouts and makes it
easier to add tests that avoid unexpected errors.

7 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.

7 years agotests: Fix incorrect descriptor type
Tobin Ehlis [Mon, 19 Sep 2016 22:23:01 +0000 (16:23 -0600)]
tests: Fix incorrect descriptor type

SamplerInUseDestroyedSignaled test was incorrectly using VK_DESCRIPTOR_TYPE_SAMPLER
instead of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER

7 years agotests: Add ImageViewInUseDestroyedSignaled test
Tobin Ehlis [Mon, 19 Sep 2016 22:15:45 +0000 (16:15 -0600)]
tests: Add ImageViewInUseDestroyedSignaled test

Bind combined image/sampler descriptor to cmd buffer, then destroy
the imageView while cmd buffer in-flight and verify in-use error.

7 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.

7 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().

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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>
7 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>
7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 years agotests: Fix VkLayerTest.InvalidPipeline
Chris Forbes [Fri, 16 Sep 2016 05:58:00 +0000 (17:58 +1200)]
tests: Fix VkLayerTest.InvalidPipeline

- Remove repeated BeginCommandBuffer.
- Ensure enough state is set up for implicit BeginRenderPass for
  graphics test.
- Ensure renderpass is finished for compute test.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Partially fix VkLayerTest.InvalidCmdBufferPipelineDestroyed
Chris Forbes [Fri, 16 Sep 2016 05:48:53 +0000 (17:48 +1200)]
tests: Partially fix VkLayerTest.InvalidCmdBufferPipelineDestroyed

- If there is no dynamic state, MUST NOT provide the struct
  (dynamicStateCount==0 is not allowed).
- Set a real line width. This was being left at 0, which is outside
  device limits.
- Disable rasterization since we don't need it, to avoid needing to
  populate even more structures.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Fix VkLayerTest.BufferMemoryNotBound
Chris Forbes [Fri, 16 Sep 2016 05:42:42 +0000 (17:42 +1200)]
tests: Fix VkLayerTest.BufferMemoryNotBound

Wrong usage flags.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Use CmdFillBuffer to slim down InvalidCmdBufferBufferDestroyed
Chris Forbes [Fri, 16 Sep 2016 05:37:17 +0000 (17:37 +1200)]
tests: Use CmdFillBuffer to slim down InvalidCmdBufferBufferDestroyed

- Fix the usage flags (in neither version did we want
  UNIFORM_BUFFER_BIT).
- Get rid of the image distraction, which had broken layout, /and/ would
  count as another referenced object to be complained about.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 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>
7 years agotests: Fix VKLayerTest.StencilLoadOp
Chris Forbes [Fri, 16 Sep 2016 04:45:16 +0000 (16:45 +1200)]
tests: Fix VKLayerTest.StencilLoadOp

Leaving this as 0 isn't valid.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Capture unexpected messages before first desired message is set
Chris Forbes [Fri, 16 Sep 2016 02:36:39 +0000 (14:36 +1200)]
tests: Capture unexpected messages before first desired message is set

Otherwise, tests that specify what they want late are vulnerable to
accidental errors in their setup code.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Fix VKTriangleTest to set the usage flags correctly on buffer.
Chris Forbes [Fri, 16 Sep 2016 02:13:53 +0000 (14:13 +1200)]
tests: Fix VKTriangleTest to set the usage flags correctly on buffer.

By default, you get transfer_src|transfer_dst.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 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

7 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

7 years agotests: Fix VkLayerTest.EnableWsiBeforeUse
Chris Forbes [Tue, 13 Sep 2016 06:19:21 +0000 (18:19 +1200)]
tests: Fix VkLayerTest.EnableWsiBeforeUse

This was producing a spurious error for completion of the ANI call not
being observable without either a fence or a semaphore.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Fix VkLayerTest.CreateBufferViewNoMemoryBoundToBuffer
Chris Forbes [Tue, 13 Sep 2016 06:13:58 +0000 (18:13 +1200)]
tests: Fix VkLayerTest.CreateBufferViewNoMemoryBoundToBuffer

This was using the wrong usage bit.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Fix VkLayerTest.FramebufferIncompatible
Chris Forbes [Tue, 13 Sep 2016 06:10:34 +0000 (18:10 +1200)]
tests: Fix VkLayerTest.FramebufferIncompatible

This was trying to execute a secondary command buffer within a subpass
whose contents were marked as inline.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Silence spurious error in MapMemWithoutHostVisibleBit
Chris Forbes [Tue, 13 Sep 2016 05:39:18 +0000 (17:39 +1200)]
tests: Silence spurious error in MapMemWithoutHostVisibleBit

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 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

7 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

7 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

7 years agotests: Complain about unexpected errors
Chris Forbes [Tue, 13 Sep 2016 04:49:57 +0000 (16:49 +1200)]
tests: Complain about unexpected errors

This won't give us test failures yet, but does make the spurious errors
visible.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Add test for depth/stencil state required in pipeline
Chris Forbes [Tue, 13 Sep 2016 04:32:57 +0000 (16:32 +1200)]
tests: Add test for depth/stencil state required in pipeline

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agotests: Hold PipelineObj::m_ds_state by ptr.
Chris Forbes [Tue, 13 Sep 2016 03:52:00 +0000 (15:52 +1200)]
tests: Hold PipelineObj::m_ds_state by ptr.

Makes it possible to pass nullptr for this structure. In fact, pretty
much all the time, we can pass nullptr here, as no depth buffer!

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 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>
7 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>
7 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>
7 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>
7 years agotests: Reintroduce test for missing entrypoint
Chris Forbes [Thu, 8 Sep 2016 22:50:24 +0000 (10:50 +1200)]
tests: Reintroduce test for missing entrypoint

This used to exist, but got nuked at some point...

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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>
7 years agolayers: Make d/s CmdClearAttachments without d/s attachment warning
Chris Forbes [Thu, 8 Sep 2016 03:35:36 +0000 (15:35 +1200)]
layers: Make d/s CmdClearAttachments without d/s attachment warning

This is pointless, but well-defined. Rework warning message to not
reference the VkClearAttachment::colorAttachment, as it's only
meaningful for color clears.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: Add VK_ATTACHMENT_UNUSED warning case for CmdClearAttachments
Chris Forbes [Thu, 8 Sep 2016 03:30:59 +0000 (15:30 +1200)]
layers: Add VK_ATTACHMENT_UNUSED warning case for CmdClearAttachments

This is a pointless clear, but well-defined.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agolayers: CmdClearAttachments colorAttachment is index into subpass
Chris Forbes [Thu, 8 Sep 2016 03:25:24 +0000 (15:25 +1200)]
layers: CmdClearAttachments colorAttachment is index into subpass

We were previously treating this as being an index into the renderpass
attachment descriptions, but that's nonsense. It's also well-defined
what happens if an out-of-range index is provided, so downgrade to a
warning.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
7 years agoloader: Remove extension enable checks
Mark Young [Fri, 9 Sep 2016 00:36:32 +0000 (18:36 -0600)]
loader: Remove extension enable checks

Apparently, the intent of Vulkan is to have the loader do no
run-time checking in each of the functions as to whether or not
the extension is enabled.  This should only be done in the
validation layers.

This resolves the crash Jeff was seeing in the Nvidia driver when
using the new extension.

Change-Id: Ic90db0bde062d6b2511954abb8677f9f20bb4285

7 years agoloader: Add checks for usage of wsi extensions
Mark Young [Thu, 8 Sep 2016 18:28:38 +0000 (12:28 -0600)]
loader: Add checks for usage of wsi extensions

The loader really should validate that the WSI extensions are
enabled before being called.  Additionally, I needed to add
more checks for the KHR_display_swapchain extension in the
parameter_validation and object_tracker layers.

Change-Id: I3d07d46baf551be6f5f07e5374d6c683e3f52e7e

7 years agotests: GH428 removal of offending line
Mark Mueller [Thu, 8 Sep 2016 17:11:25 +0000 (11:11 -0600)]
tests: GH428 removal of offending line

The ill constructed draw is not needed and causes issues on some platforms.

Change-Id: I695a386e3a70a2d004b047044ee534e204a6499a

7 years agolayers: Remove old/unnecessary FIXME from swapchain layer
Ian Elliott [Thu, 8 Sep 2016 17:34:52 +0000 (11:34 -0600)]
layers: Remove old/unnecessary FIXME from swapchain layer

This FIXME comment does not apply.  It may have applied, if the line being
referred to once copied a pointer to user data, but at this point, the actual
data is being copied into a struct owned by the swapchain layer, which is what
the comment was about.

7 years agotests: Clang-format layer_validation_tests.cpp
Mark Lobodzinski [Thu, 8 Sep 2016 16:45:35 +0000 (10:45 -0600)]
tests: Clang-format layer_validation_tests.cpp

Change-Id: I9f790550be5e727f8f4e10c42ddfba6fad3d581a

7 years agotests: Clang-format vktestframework files
Mark Lobodzinski [Wed, 7 Sep 2016 22:35:55 +0000 (16:35 -0600)]
tests: Clang-format vktestframework files

Change-Id: I7b69127fb64191d35cfd1995d07096d6bc1c1759

7 years agotests: Clang-format vktestbinding files
Mark Lobodzinski [Wed, 7 Sep 2016 22:34:56 +0000 (16:34 -0600)]
tests: Clang-format vktestbinding files

Change-Id: Idbec767a4a587639b59ff42201c1c024c1b4fa7e

7 years agotests: Clang-format vkrenderframework files
Mark Lobodzinski [Wed, 7 Sep 2016 22:34:10 +0000 (16:34 -0600)]
tests: Clang-format vkrenderframework files

Change-Id: I694d683378e12195716e19ce2a25e56a5adac1cc

7 years agotests: Clang-format test_environment files
Mark Lobodzinski [Wed, 7 Sep 2016 22:33:17 +0000 (16:33 -0600)]
tests: Clang-format test_environment files

Change-Id: I23703c8cf024b01116f9ecb0a19ebad62667a27d

7 years agotests: Clang-format loader_validation_tests.cpp
Mark Lobodzinski [Wed, 7 Sep 2016 22:29:11 +0000 (16:29 -0600)]
tests: Clang-format loader_validation_tests.cpp

Change-Id: If4f446cc8499bf0c894735923b7661c8e3aa0ae2

7 years agotests: Clang-format test_common.h
Mark Lobodzinski [Wed, 7 Sep 2016 22:27:38 +0000 (16:27 -0600)]
tests: Clang-format test_common.h

Change-Id: I9ed4992a3f4cc8215de805d1f984ac9b5300a974

7 years agotests: Add clang-format config file
Mark Lobodzinski [Wed, 7 Sep 2016 22:05:48 +0000 (16:05 -0600)]
tests: Add clang-format config file

Change-Id: I265cffaf708244d5b268018aa47fc869facce6fd

7 years agolayers: Move in_use.store(0) to BASE_NODE constructor
Tobin Ehlis [Wed, 7 Sep 2016 21:18:08 +0000 (15:18 -0600)]
layers: Move in_use.store(0) to BASE_NODE constructor

7 years agotests: Add in-use sampler test
Tobin Ehlis [Wed, 7 Sep 2016 19:52:18 +0000 (13:52 -0600)]
tests: Add in-use sampler test

SamplerInUseDestroyedSignaled creates a sampler that is indirectly bound to
cmd buffer via a descriptor set. Then submit cmd buffer, destroy sampler and
verify that an error is correctly flagged.

7 years agotests: Add in-use pipeline test
Tobin Ehlis [Wed, 7 Sep 2016 19:51:24 +0000 (13:51 -0600)]
tests: Add in-use pipeline test

PipelineInUseDestroyedSignaled creates a pipeline, binds it to cmd buffer,
submits cmd buffer, then destroys pipeline and verifies that we hit in-use error.

7 years agotests: Add in-use query pool destroy test
Tobin Ehlis [Thu, 1 Sep 2016 15:51:06 +0000 (08:51 -0700)]
tests: Add in-use query pool destroy test

QueryPoolInUseDestroyedSignaled test destroys a QueryPool that is
in-flight and verifies correct error flagged.

7 years agolayers: Update bound object increment and decrement functions
Tobin Ehlis [Wed, 7 Sep 2016 17:09:01 +0000 (11:09 -0600)]
layers: Update bound object increment and decrement functions

Unify the handling of in-use increment/decrement for QueryPool, Pipeline,
Image, Buffer, and Event objects.

7 years agolayers: Clarify in-use object error message
Tobin Ehlis [Wed, 7 Sep 2016 17:04:49 +0000 (11:04 -0600)]
layers: Clarify in-use object error message

7 years agotests: Wait idle instead of ignoring errors
Tobin Ehlis [Thu, 1 Sep 2016 15:50:06 +0000 (08:50 -0700)]
tests: Wait idle instead of ignoring errors

Prior to destroying objects wait for cmd buffer to complete to avoid errors rather than
ignoring the errors.

7 years agolayers: Improve map cleanup on object deletion
Tobin Ehlis [Fri, 26 Aug 2016 23:09:24 +0000 (17:09 -0600)]
layers: Improve map cleanup on object deletion

If object deletion is skipped due to validation error, don't remove object from map.

7 years agolayers: Add detection for in-use query pool & clean-up destroys
Tobin Ehlis [Thu, 18 Aug 2016 14:23:30 +0000 (08:23 -0600)]
layers: Add detection for in-use query pool & clean-up destroys

Flag error if in-use query pool is destroyed.
Unify in-use error reporting to use common function ValidateObjectNotInUse().

Clean up Destroy functions to only remove objects from maps if skip is not set
for semaphores, events, querypool, pipeline

7 years agolayers: Flag error on destroyed pipeline in-use
Tobin Ehlis [Thu, 18 Aug 2016 13:58:33 +0000 (07:58 -0600)]
layers: Flag error on destroyed pipeline in-use

7 years agolayers: Flag error on destroyed sampler in-use
Tobin Ehlis [Thu, 18 Aug 2016 03:01:38 +0000 (21:01 -0600)]
layers: Flag error on destroyed sampler in-use

7 years agotests: GH428 Cleanup of some tests
Mark Mueller [Tue, 6 Sep 2016 04:52:21 +0000 (22:52 -0600)]
tests: GH428 Cleanup of some tests

Address comments on PR.

Change-Id: I803055665ba4a230c5b3cb4dac30642636cdd06b