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
Lenny Komow [Thu, 4 Aug 2016 16:32:27 +0000 (10:32 -0600)]
winsdk: Make installer version programmable
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.
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
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>
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.
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
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.
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.
Tony Barbour [Thu, 28 Jul 2016 18:01:45 +0000 (12:01 -0600)]
demos: Remove the need for QueueWaitIdle in cube
Change-Id: Iddccf0d672632ad7f0821fb98c685c944c2b8b77
Tony Barbour [Thu, 28 Jul 2016 16:50:13 +0000 (10:50 -0600)]
demos: Use renderpass finalLayout to get to PRESENT_SRC_KHR
instead of an explicit memory barrier
Change-Id: I9c9c19ee6640fc696576d67ffc608b9205d84166
Tobin Ehlis [Fri, 22 Jul 2016 22:55:19 +0000 (16:55 -0600)]
layers: Fix bug in cmd buffer framebuffer binding
If cmd buffers were freed via DestroyCommandPool, then the framebuffer links to the
individual cb_nodes were not getting cleared. Fix that issue.
This is initial, simple solution to avoid crash, need smarter solution long-term.
Cody Northrop [Mon, 1 Aug 2016 16:27:25 +0000 (10:27 -0600)]
toolchain: Update revisions for Android
Also add spirv-headers, a new dependency for shaderc.
Tobin Ehlis [Tue, 2 Aug 2016 16:50:29 +0000 (10:50 -0600)]
layers: Fix object_tracker build
This moves a static array of maps to be a vector of maps.
Building android from Windows crashes clang without this change.
clang in the NDK doesn't like arrays of unordered_maps.
Mark Lobodzinski [Tue, 2 Aug 2016 15:30:28 +0000 (09:30 -0600)]
layers: Remove debug comments from OT.h
Change-Id: I1cf485ddb54223b873746ff218f0f34085a87450
Chris Forbes [Mon, 1 Aug 2016 20:08:16 +0000 (08:08 +1200)]
layers: Fix #808 broken mapping of image types to view types
This was trying to be too clever, and was foiled by bad assumptions
about the enum order.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Mark Young [Mon, 1 Aug 2016 17:06:53 +0000 (11:06 -0600)]
layers: Generate full vk_dispatch_table_helper
Generate the full vk_dispatch_table-helper file for all platforms
as part of the build process now. This includes all WSI
extension entry-points for all build targets we support increasing
portablility of the header.
Change-Id: Ie83423e7ea169f7251c5369992a6144a97db1ddc
Johannes van Waveren [Fri, 22 Jul 2016 21:10:11 +0000 (16:10 -0500)]
layers: gh793 gen vk_dispatch_table_helper.h
Generate one vk_dispatch_table_helper.h for all platforms.
Change-Id: I17fa435bc69cacfdd75dd93fbb0a5a37222aaa2b
Mark Young [Mon, 1 Aug 2016 17:34:36 +0000 (11:34 -0600)]
loader : Fix segfault in vulkaninfo
Last commit introduced a segfault in VulkanInfo. This corrects it.
Change-Id: Ie4115bbe24191bdad9f539e5d9b1658982417f51
davidhubbard [Thu, 28 Jul 2016 00:59:58 +0000 (17:59 -0700)]
loader: gh571 vkEnumerateInstanceLayerProperties()
This fixed a memory leak.
Steps to reproduce:
Run valgrind --leak_check=full on a this test file:
```
int main() {
uint32_t layerCount = 0;
vkEnumerateInstanceLayerProperties(&layerCount, nullptr);
printf("layerCount=%u\n", layerCount);
return 0;
}
```
valgrind output will look like:
```
==PID==
==PID== 49,920 bytes in 6 blocks are definitely lost in loss record 57 of 58
==PID== at 0x40307C4: malloc (vg_replace_malloc.c:270)
==PID== by 0x4A2B5F3: loader_instance_heap_alloc (loader/loader.c:178)
==PID== by 0x4A2CB0D: loader_init_generic_list (loader/loader.c:858)
==PID== by 0x4A2CBDE: loader_add_to_ext_list (loader/loader.c:889)
==PID== by 0x4A30A32: loader_read_json_layer (loader/loader.c:2311)
==PID== by 0x4A31373: loader_add_layer_properties (loader/loader.c:2509)
==PID== by 0x4A3286F: loader_layer_scan (loader/loader.c:3032)
==PID== by 0x4A38DFC: vkEnumerateInstanceLayerProperties (loader/trampoline.c:239)
==PID==
```
The fix is simple: vkEnumerateInstanceLayerProperties() in loader/trampoline.c should call loader_delete_layer_properties(), not loader_destroy_layer_list() in both places it frees resources associated with the instance_layer_list.
Change-Id: I3275195dd27703c2747971288327d546efe5ed25
Chris Forbes [Fri, 24 Jun 2016 05:04:54 +0000 (17:04 +1200)]
layers: Add some TODOs for weird code that should go away
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Thu, 23 Jun 2016 05:03:55 +0000 (17:03 +1200)]
layers: Drop QUEUE_NODE::device
This was unused.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Thu, 28 Jul 2016 02:15:38 +0000 (14:15 +1200)]
layers: Track valid dynamic scissor and viewport indices with masks
CmdSetViewport/CmdSetScissor were broken; they assumed the update
replaced all the viewports/scissors; further, the drawtime validation
was too aggressive -- nowhere does the spec require the number of valid
dynamic viewports/ dynamic scissors to be equal to the number used by
the PSO; just that all viewports/scissors used by the PSO must be
provided.
V2: Add more parens to quiet warnings in android build
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Tue, 26 Jul 2016 05:06:10 +0000 (17:06 +1200)]
layers: Validate image view type requirement for descriptor sets
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Mon, 25 Jul 2016 06:12:05 +0000 (18:12 +1200)]
layers: Generate appropriate sets of requirement flags for OpTypeImage
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Mon, 25 Jul 2016 06:10:41 +0000 (18:10 +1200)]
layers: Add plumbing for descriptor requirements
We want to be able to impose requirements on images & views bound to
descriptor sets based on their usage in the shader. This adds the
plumbing from pipelines into descriptor sets to enable that.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Mon, 25 Jul 2016 06:11:50 +0000 (18:11 +1200)]
layers: Add enum for descriptor requirements
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Rene Lindsay [Fri, 29 Jul 2016 17:49:11 +0000 (10:49 -0700)]
demos: Flip cube texture and TC's, so image is no longer inverted
Rene Lindsay [Fri, 29 Jul 2016 17:43:47 +0000 (10:43 -0700)]
demos: Remove unused function parameter.
Mark Young [Fri, 22 Jul 2016 14:51:05 +0000 (08:51 -0600)]
docs: Clean up LoaderAndLayerInterface markdown
Perform some wordsmithing and general clean-up of the
LoaderAndLayerInterface markdown file.
Change-Id: I286d0f1d01241b376ba2f4dfa97d2329b04d515d
Michael Lentine [Thu, 21 Jul 2016 22:24:56 +0000 (17:24 -0500)]
layers: GH722 Add query function calls from secondary buffers.
Cody Northrop [Wed, 13 Jul 2016 23:24:59 +0000 (17:24 -0600)]
tests: Create APK version of layer validation tests
Tony Barbour [Mon, 18 Jul 2016 19:21:06 +0000 (13:21 -0600)]
demos: Fix cube to handle seperate gfx / present queues
Change-Id: I92497bb966aa6d35746184249e921155ed26d67e
Jeremy Hayes [Wed, 6 Jul 2016 18:02:03 +0000 (12:02 -0600)]
loader: return incomplete when count < available
The list was being destroyed before the check.
Change-Id: I500a22c8e2fffa8c852235f688026cd80f84088d
Cody Northrop [Tue, 26 Jul 2016 20:25:45 +0000 (14:25 -0600)]
android: Lift global offset table size limit (-mxgot)
Currently the mips64 build for Android is broken due to size
increases of core_validation. If you disabled optimizations (-O0),
you'll get the following error:
relocation truncated to fit: R_MIPS_CALL16
The linker flag to lift the limit is -mxgot, documented here:
https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/MIPS-Options.html
It is a slight de-optimization for global symbol lookups (3 inst
instead of 1). Hopefully we aren't using global lookups in
performance critical code.
Tony Barbour [Tue, 26 Jul 2016 16:17:28 +0000 (10:17 -0600)]
Tools: Bump spirv-tools revision to include fix
Covers fix for SPIRV-Tools issue #270 - access violation in
Vulkan conformance test
Change-Id: Idc3470f9ba68d9189d3536fe776459ce2ccba388
Mark Lobodzinski [Fri, 22 Jul 2016 21:30:27 +0000 (15:30 -0600)]
layers: Restore OT WSI GPA prefixes
Change-Id: Ia83e40c8c5c92a8ac50dc2d5bf5bf9b2b255594b
Tobin Ehlis [Thu, 21 Jul 2016 20:48:21 +0000 (14:48 -0600)]
layers: Fix copy-paste "DEPTH" instead of "STENCIL"
Tobin Ehlis [Tue, 19 Jul 2016 23:39:34 +0000 (17:39 -0600)]
layers: Fix image aspect checks
Previously validation required DS images to have both DEPTH and STENCIL
aspect bits set, but spec only requires that at least one is set.
Also, we weren't checking case of depth or stencil only formats, or
color format to make sure that correct aspect mask was set.
Mark Lobodzinski [Thu, 21 Jul 2016 15:13:18 +0000 (09:13 -0600)]
tests: Update doc validation script
Changed object_tracker location, status.
Change-Id: I2b9834002cdeb8a3b48e83d8da6f727edfd2ffdd
Mark Lobodzinski [Thu, 21 Jul 2016 15:09:35 +0000 (09:09 -0600)]
layers: Update codegen for OT removal
Removed object_tracker code from vk_layer_generate.py.
Change-Id: I0ebd1c379deabfb0712d6692751145f34b430459
Mark Lobodzinski [Mon, 18 Jul 2016 23:06:52 +0000 (17:06 -0600)]
layers: Fixup OT error messages
Print object type explicitly; also fixup a couple of format
specifiers.
Change-Id: I6f5036f70cae05bd5f7ee9320e24b2e16bdc811b
Mark Lobodzinski [Wed, 13 Jul 2016 17:29:00 +0000 (11:29 -0600)]
layers: Fix thread-safety fails in OT FreeXxx APIs
Tracking data was cleaned up after calling down the chain in
FreeCommandBuffers and FreeDescriptorSets -- this left a hole that
another thread could walk through and corrupt the tracking data.
Change-Id: I7cc9c9bfae9f1ea179122125dd09952650f14d81
Mark Lobodzinski [Fri, 1 Jul 2016 16:53:31 +0000 (10:53 -0600)]
layers: Update object_tracker layer
Removed dead code, added per-instance and per-device object tracking,
(this was broken in codegen'd version with no cross-device
validation), updated for new layer architectures and coding standards,
removed OT-related codegen -- it is now a standalone cpp file.
Change-Id: I64464b855e1b4841c8e3a581387e0e9065b006f7
Mark Young [Tue, 5 Jul 2016 22:41:50 +0000 (16:41 -0600)]
layers : gh682 move gipa dispatch table init
Move the GIPA setup of the dispatch tables for layers into
the layer_init_device_dispatch_table call since we're already
doing a majority of it there. This removes the need to separately
setup the WSI extension entry-points.
Additionally, memset the table to 0, just to make sure anything
that gets added in the future is obvoiusly not set.
Change-Id: I63c7c107cd9f7957e2766fdbeb8a06bc1ae0eda6
Mark Young [Thu, 21 Jul 2016 15:45:32 +0000 (09:45 -0600)]
docs: Remove extra line in doc headers
GitHub markdown adds a line after H1 and H2 entries. Normal
markdown doesn't do this. So my WSYIWYG editor incorrectly showed
the results of my previous edits.
Change-Id: I3c197c1fb1f364bf4b1050d1eaa1141affefe9d1
David Pinedo [Thu, 21 Jul 2016 16:56:27 +0000 (10:56 -0600)]
misc: Support for cross-platform trace/replay
Change-Id: If77890356911fa90d22af28a449a05284ad2097f
Tobin Ehlis [Thu, 21 Jul 2016 12:46:12 +0000 (06:46 -0600)]
layers: Check BUFFER_CREATE_SPARSE_BINDING_BIT for buffers
Tobin Ehlis [Wed, 20 Jul 2016 20:04:20 +0000 (14:04 -0600)]
layers: Validation buffer descriptor updates for bound memory
When updating buffer descriptors, make sure that there is memory bound to any
non-sparse buffer.
Add comment that we don't need to do this for image descriptor updates
because they require the imageView (not just image) and we already validate
at imageView creation that memory is bound to image.
Tobin Ehlis [Wed, 20 Jul 2016 19:27:33 +0000 (13:27 -0600)]
layers: Refactor buffer/image validation functions
Add some consts and put fwd decls in core_validation_types.h so that these
can be used by descriptor_set class.
Mark Young [Wed, 20 Jul 2016 17:38:53 +0000 (11:38 -0600)]
loader: Clean up some things in the MD file
Clean up some documentation in the LoaderAndLayerInterface
markdown. Over the next few weeks, I'll be working on
cleaning up the format and language of this doc.
Change-Id: I7858981293de9befb34701c31542d88c664cd6d8
Dustin Graves [Tue, 19 Jul 2016 19:43:53 +0000 (13:43 -0600)]
layers: Change pNext validation error to warning
Change the severity level of the parameter_validation layer's pNext
parameter validation messages from error to warning. Also add an
explanation that the warning is derived from the Valid Usage
language from version X of the Vulkan spec/header, which may be out
of date:
This warning is based on the Valid Usage documentation for version %d
of the Vulkan header. It is possible that you are using a struct
from a private extension or an extension that was added to a later
version of the Vulkan header, in which case your use of pNext is
perfectly valid but is not guaranteed to work correctly with
validation enabled
Issues-Addressed: LunarXchange 560
Change-Id: I97f55cba7538506d246e45ef603a86db9ad1adcb
Dustin Graves [Tue, 19 Jul 2016 19:17:35 +0000 (13:17 -0600)]
layers: Add codegen header version
Add an integer constant to the parameter_validation layer's generated
code to specify the header/XML version from which the code was
generated.
Change-Id: Id690962856130007a24732a478ffa9c28f774b8f
Dustin Graves [Mon, 18 Jul 2016 20:54:37 +0000 (14:54 -0600)]
codegen: Sync with Vulkan-Docs vk.xml
Update the local copy of vk.xml with header 21 changes from the
original Vulkan-Docs vk.xml.
Change-Id: I48af9f50ad31c79be2ef2c78c4a33392f7d64d51
Mark Lobodzinski [Wed, 20 Jul 2016 16:02:23 +0000 (10:02 -0600)]
layers: Fix Windows build warning
Change-Id: Ic40ff6cb79882be92abbb2d8c02298962c73e46f
Jamie Madill [Wed, 6 Jul 2016 17:37:33 +0000 (13:37 -0400)]
layers: Fix an MSVS error and a warning.
Fatal error C1017: invalid integer constant expression
warning C4389: '!=': signed/unsigned mismatch
Change-Id: I13e06f1578e47a0076241e1a344f4f05ae6d50c2
Mark Lobodzinski [Wed, 20 Jul 2016 15:15:53 +0000 (09:15 -0600)]
layers: Clarify std_validation usage in README
Change-Id: Ia99542ca3f96d719f60d5dccab115340bd88c3f3
Chris Forbes [Tue, 19 Jul 2016 03:08:38 +0000 (15:08 +1200)]
layers: Relax SC descriptor binding uniqueness to allow split variables
This allows the separate sampler & image variables case from 13.1.4 to
work correctly.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Tue, 19 Jul 2016 02:50:04 +0000 (14:50 +1200)]
layers: Allow consuming COMBINED_IMAGE_SAMPLER as separate pieces
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Tobin Ehlis [Mon, 18 Jul 2016 23:11:29 +0000 (17:11 -0600)]
tests: Add test exceptions to doc validator
Don't require test cases for internal layer error cases.
Tobin Ehlis [Mon, 18 Jul 2016 23:04:15 +0000 (17:04 -0600)]
tests: Remove old '_NA' doc check code
There are no "_NA" checks remaining so kill exception code for it.
Tobin Ehlis [Mon, 18 Jul 2016 22:22:03 +0000 (16:22 -0600)]
layers: Kill redundant DRAWSTATE_PUSH_CONSTANTS_ERROR case
This check was really an INVALID_PIPELINE check that is already
handled by object_tracker so killing it in core_validation.
Tobin Ehlis [Mon, 18 Jul 2016 22:19:42 +0000 (16:19 -0600)]
tests: Update doc for PUSH_CONSTANTS_ERROR
The DRAWSTATE_PUSH_CONSTANTS_ERROR cases are all hit by InvalidPushConstants
test.
Tobin Ehlis [Mon, 18 Jul 2016 20:26:18 +0000 (14:26 -0600)]
layers: Replace INVALID_EVENT check with OBJECT_INUSE
If an event being destroyed is in use, the correct error enum to use
is DRAWSTATE_OBJECT_INUSE.
Tobin Ehlis [Mon, 18 Jul 2016 20:19:12 +0000 (14:19 -0600)]
layers: Replace INVALID_SEMAPHORE with OBJECT_INUSE check
DRAWSTATE_INVALID_SEMAPHORE was bad name for what is really another
instance of DRAWSTATE_OBJECT_INUSE check. Updated the check to use
the new enum and removed the doc entry for the old check which is
no longer used.
Tobin Ehlis [Mon, 18 Jul 2016 19:49:22 +0000 (13:49 -0600)]
tests: Remove duplicate check column from doc
Tobin Ehlis [Mon, 18 Jul 2016 19:39:24 +0000 (13:39 -0600)]
tests: Updated test doc
Clarified cases to be checked for OBJECT_INUSE, INVALID_QUERY and
INVALID_FENCE cases.
Tobin Ehlis [Mon, 18 Jul 2016 19:25:08 +0000 (13:25 -0600)]
tests: Update doc for CANT_FREE_FROM_NON_FREE_POOL
This case is correctly verified by test FreeDescriptorFromOneShotPool.
Tobin Ehlis [Mon, 18 Jul 2016 19:23:23 +0000 (13:23 -0600)]
tests: Update doc for DRAWSTATE_INVALID_DESCRIPTOR_SET
Capture another affected API and update Notes.
Tobin Ehlis [Mon, 18 Jul 2016 19:14:01 +0000 (13:14 -0600)]
layers: Remove DRAWSTATE_INVALID_POOL check
This check was only flagged when Allocating descriptor sets or resetting
a descriptor pool, and in both cases object_tracker will be the first layer
to identify and flag the error.
Removing this as a redundant check and updating documentation.
Tobin Ehlis [Wed, 13 Jul 2016 20:54:17 +0000 (14:54 -0600)]
tests: Update doc for DRAWSTATE_VIEWPORT_SCISSOR_MISMATCH
All of these cases are hit by various tests so added those to the doc.
Tobin Ehlis [Wed, 13 Jul 2016 20:48:32 +0000 (14:48 -0600)]
tests: Update doc for DRAWSTATE_INVALID_COMMAND_BUFFER
A few of these cases are already hit so added those test names.
Most of the cases are still not hit by testing, those, so broke
those out in the Notes column.
Tobin Ehlis [Wed, 13 Jul 2016 20:42:50 +0000 (14:42 -0600)]
tests: Remove DRAWSTATE_INVALID_PIPELINE_LAYOUT enum value
This was no longer used anywhere so remove from enum and doc.
Tobin Ehlis [Wed, 13 Jul 2016 20:37:49 +0000 (14:37 -0600)]
tests: Update doc for CB_SIMULTANEOUS_USE check
There are 3 cases of this check in validation. The first case is hit by
CommandBufferTwoSubmits test so added that.
The other 2 cases are both in CmdExecuteCommands() and are not hit to made
a note of that for future work.
Mark Young [Tue, 19 Jul 2016 17:49:45 +0000 (11:49 -0600)]
loader: Clarify in docs about WSI and inst ext.
Clarify in the LoaderAndLayerInterface markdown file what WSI
extensions are available by default in the desktop loader.
Additionally, clarify that instance extensions are not supported
by the Loader unless they have been specifically added to the
Loader.
Change-Id: I21bd2a63ed1e4a7e50d27e7a6b136eeeaea4d68c
Tobin Ehlis [Tue, 19 Jul 2016 01:01:43 +0000 (19:01 -0600)]
layers: GH773 Check improper renderpass layout for only first use
Only verify that a LOAD_OP attachment does not have first layout of *READ_ONLY*
type on its first use. The spec language this is checking is from section
"7.1 Render Pass Creation" :
The first use of an attachment must not specify a layout equal to
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
if the attachment specifies that the loadOp is VK_ATTACHMENT_LOAD_OP_CLEAR.
Previously we were checking this condition on all uses of an attachment
which would incorrectly flag errors on proper uses beyond the first use by
later subpasses.
Note that validation for CreateRenderPass has a fair amount of duplication and
still needs to be cleaned up to consolidate work that's currently being done
before and after the call down the chain. This is simply a singular bug fix.
Karl Schultz [Mon, 18 Jul 2016 22:40:49 +0000 (16:40 -0600)]
misc: update spirv tools revision
Change-Id: I8abb31de604ae4a50bb4900e9498de9953c5646b
Dustin Graves [Thu, 14 Jul 2016 23:28:11 +0000 (17:28 -0600)]
layers: NV_dedicated_allocation support for unique_objects
Add ID substitution support for the
VkDedicatedAllocationMemoryAllocateInfoNV extension structure to the
unique_objects layer. The current implementation is specific to the
case where the vkAllocateMemory pAllocateInfo parameter references
a single VkDedicatedAllocationMemoryAllocateInfoNV struct.
Issues-Addressed: GitHub #755
Change-Id: I33c3f00d32149044694ecafe808673e5d90107b4
Karl Schultz [Mon, 18 Jul 2016 18:04:39 +0000 (12:04 -0600)]
misc: Update to Vulkan header version 21
Change-Id: I112bb3d53daf067b231532620f45cd8891537cbb
Karl Schultz [Mon, 18 Jul 2016 15:40:37 +0000 (09:40 -0600)]
build: Update glslang to e4821e
This includes applying a patch to glslang to revert glslang
commit a5c33d, which fixes a texel fetch problem that many IHV
drivers are not ready to cope with yet.
Mark Mueller [Wed, 13 Jul 2016 20:49:35 +0000 (14:49 -0600)]
layers: Fix minor completeness/performance issue
The first time the condition is discovered it will
be the same as every subsequent time, so there is
no need to continue. Also, the whole structure must
be compared, so memcmp assures that will happen
with good efficiency
Change-Id: I71f608c71f83ebcd02212bb391a30bdf15279ff6
Cody Northrop [Wed, 13 Jul 2016 21:59:22 +0000 (15:59 -0600)]
windows: Return exit code from build script if any step fails
Tobin Ehlis [Fri, 15 Jul 2016 22:01:13 +0000 (16:01 -0600)]
layers: Update clearValueCount check
The pClearValues array is indexed by the attachment index which
means that it must be at least as large as the last LOAD_OP_CLEAR
attachment in the renderpass. Updating this check to reflect this
requirement.
Mark Lobodzinski [Fri, 15 Jul 2016 19:53:44 +0000 (13:53 -0600)]
layers: PR767, Fix crash exiting smoketest
Commit a86b57c caused a Windows crash when shutting down smoketest.
Command buffer cleanup for object bindings wasn't happening when
calling DestroyCommandPool.
Change-Id: Ie233763e37ed9bc6988dddbf932aa3eda2960940
Mark Lobodzinski [Thu, 14 Jul 2016 18:09:12 +0000 (12:09 -0600)]
layers: LX555/GH663, Update details doc
Add entry for new buffer/image memory binding checks.
Change-Id: Ic02c97cd8dd7e054ca67a66d82fc5728bf9167be
Mark Lobodzinski [Thu, 14 Jul 2016 15:54:11 +0000 (09:54 -0600)]
layers: LX555/GH663, Add BindXxxMemory validation
If the user neglected to call BindImageMemory or BindBufferMemory,
validation gave not indication of the failure which then results in
a driver or layer crash. This commit extends and generalizes the
checks done for CreateImageView and CreateBufferView to cover all
the bound memory checks for the 'recording commands in command
buffer' case in spec section 11.6
Change-Id: I3b4a3d130e9b6c242413fc0ad14c1624295b33b3
Tobin Ehlis [Fri, 8 Jul 2016 20:22:01 +0000 (14:22 -0600)]
layers: Handle binding between cmd buffer and query pools
For the CmdBind* functions that involve queryPool object, add a binding between
the cmd buffer and the queryPool.
In the event that a queryPool is destroyed, invalidate any bound cmd buffers
and make sure invalid reporting is handled correctly for query pools.
When a cmd buffer is destroyed that has query pool bindings, those bindings
will be cleared under existing object_binding cleanup in resetCB.
Tobin Ehlis [Thu, 7 Jul 2016 22:47:10 +0000 (16:47 -0600)]
layers: Set cmd buffer invalid on event destroy
When an event is destroyed, set any cmd buffers that it was bound
to to the CB_INVALID state.
Also added getEventNode() helper and made use of it where appropriate.
Tobin Ehlis [Wed, 13 Jul 2016 15:41:09 +0000 (09:41 -0600)]
layers: Rework Destroy/Free data structure cleanup
When destroying dispatchable objects we must cleanup internal data
structures prior to calling down the chain in the event that another
thread were to prempt execution and re-allocate a freed handle prior
to the layer cleanup code executing.
For non-dispatchable handles this shouldn't be a requirement due to
the fact that layers only see unique handles. However, moved some
non-dispatchable cleanup before the call to ICD as well for consistency
and to be extra safe.
Mike Stroyan [Wed, 13 Jul 2016 17:07:27 +0000 (11:07 -0600)]
layers: threading with cmd buffer handle reuse
A driver may reuse a command buffer handle in another thread.
The threading layer needs to remove command buffer information
before calling FreeCommandBuffers.
This addresses part of github issue #719.
Tobin Ehlis [Thu, 14 Jul 2016 20:45:54 +0000 (14:45 -0600)]
layers: Remove unused vars from vk-layer-generate.py
Tobin Ehlis [Thu, 14 Jul 2016 20:37:51 +0000 (14:37 -0600)]
layers: On Free/Destroy fix unique_objects map cleanup
When an object is freed or destroyed, unique_objects must clean up its
map entry prior to calling down the chain. This is becase the ICD may
be preempted just after object deletion, and the same object handle
could then be allocated before returning to validation. In that case,
unique_objects would delete the entry for the newly-created object.
Mike Stroyan [Wed, 13 Jul 2016 16:10:25 +0000 (10:10 -0600)]
layers: faster threading layer for single thread
Add a check to the threading layer to detect a single thread case.
If the application has only called vulkan from one thread at a time,
then skip access counters for externally synchronized parameters.
This greatly reduces the overhead of the layer for applications
that don't truly use vulkan in a multi-threaded way.
Mike Stroyan [Thu, 30 Jun 2016 19:21:37 +0000 (13:21 -0600)]
layers: Use type-specific mutexes in thread layer
Use type-specific mutexes to reduce lock contention.
Nekotekina [Fri, 8 Jul 2016 12:49:13 +0000 (15:49 +0300)]
loader: mr739 - Link VKstatic against shlwapi
Change-Id: I40345f39ece1d580139cb09ae01c1a36d43016dd
Mark Lobodzinski [Wed, 13 Jul 2016 20:59:41 +0000 (14:59 -0600)]
layers: Fix core_validation Win32 build
Change-Id: Ib15d5c6fad234c0d657b59613293f38d28969697
Tobin Ehlis [Fri, 8 Jul 2016 21:42:38 +0000 (15:42 -0600)]
layers: Add binding between cmd buffer and pipeline
Track all pipelines bound to a cmd buffer and if any of them are destroyed
set the cmd buffer as invalid.
Tobin Ehlis [Fri, 8 Jul 2016 20:22:01 +0000 (14:22 -0600)]
layers: Handle binding between cmd buffer and query pools
For the CmdBind* functions that involve queryPool object, add a binding between
the cmd buffer and the queryPool.
In the event that a queryPool is destroyed, invalidate any bound cmd buffers
and make sure invalid reporting is handled correctly for query pools.
When a cmd buffer is destroyed that has query pool bindings, those bindings
will be cleared under existing object_binding cleanup in resetCB.
Tobin Ehlis [Fri, 8 Jul 2016 19:27:48 +0000 (13:27 -0600)]
layers: Add addCommandBufferBinding() utility function
Created addCommandBufferBinding() utility function that creates a link between the
cb_binding data struct of an object and the object_binding data struct of the cmd
buffer.
Currently updated events to use this utility function, but will expand to other
object types in the future.
Tobin Ehlis [Thu, 7 Jul 2016 22:47:10 +0000 (16:47 -0600)]
layers: Set cmd buffer invalid on event destroy
When an event is destroyed, set any cmd buffers that it was bound
to to the CB_INVALID state.
Also added getEventNode() helper and made use of it where appropriate.