| Age | Commit message (Collapse) | Author |
|
Add VUID checks to vkCreateDescriptorSetLayout for push descriptor sets.
Additional checks include:
VALIDATION_ERROR_05000230 VkDescriptorSetLayoutCreateInfo-flags-00280
VALIDATION_ERROR_05000232 VkDescriptorSetLayoutCreateInfo-flags-00281
Also added check for use of
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR when the
required extension VK_KHR_push_descriptor is not enabled.
Updated CreateDescriptorSetBindingWithIgnoredSamplers test, which
violated the above check.
Change-Id: Ie009019bbb7859553df92473796a1a929a9464f7
|
|
Add three tests to flag with descriptor set update operations are being
done to descriptor sets with destroyed descriptor set layouts. The tests
use overload VUID (generic "must be valid * handles) which need to be
replaced with specific ones when they are added to the spec.
VALIDATION_ERROR_15c00280 (write dst must be valid) ->
write dst created from destroyed layout
VALIDATION_ERROR_03207601 (copy dst must be valid) ->
copy dst created from destroyed layout
VALIDATION_ERROR_0322d201 (copy src must be valid) ->
copy src create from destroyed layout
Change-Id: I8a3edc67b3e86037cdaa6353176814abfddef1a0
|
|
Validation of descriptors at draw or dispatch time is now cached, s.t.
without changes that affect validity, validation checks are not
repeated.
Change-Id: I713662d00813989bf4441921456afca431d730d7
|
|
Profiling indicated hot spots in DescriptorSet Get functions which
iterated in binding space to lookup values. Replaced iterative searches
with maps/sets.
Additionally simplified construction, optimized map/set creation and
Get.* for DescriptorSet and DescriptorSetLayout.
Change-Id: Ia2948e56333d3643d4377b39e75acf4c951d558b
|
|
Binding start/end lookup where using two separate maps indexed on a
common key. Combined to avoid repeated lookups.
Change-Id: I57ed71736537de5eb83fe41599a8acec9bf23d13
|
|
VS2013 does not provide 'noexcept'. Layers had multiple occurences
of a NOEXCEPT macro to protect the VS2013 build. This commit
consolidates that macro to a single location in vk_sdk_platform.h,
which is also visible to the layer tests via test_common.h.
Updates the vktestbinding.h occurences of 'noexcept' to use the
NOEXCEPT macro.
Change-Id: I38bf8c08cda6fe75de78dff69050a913b47f91b1
|
|
|
|
|
|
Change-Id: I1095edce0f26e2a4ced6fa301143622dc5cd0afd
|
|
When checking IsCompatible() for a DescriptorSetLayout, the passed-in
layout is always from a pipelineLayout, however this was not specified
in the code. Add comment to specify this usage and update the error
message to always distinguish which of the layouts using in the compare
is from the pipelineLayout.
|
|
Declare DescriptorSetLayout's const for shared_ptrs in Pipeline layout
and DSAllocate structs.
|
|
Update IsCompatible calls for DescriptorSetLayout class to use raw ptrs
instead of shared_ptr as the calls just temporarily use the ptr and
don't affect ptr ownership.
|
|
The DescriptorSetLayout pointed to by shared_ptr in DescriptorSet is
const so add const across uses as appropriate.
|
|
DescriptorSetLayout shared_ptr will always survive the lifetime of the
DescriptorSet constructor so pass by const ref.
|
|
Update Descriptor Set Layout copy in Descriptor Set, as well as various
ptr references to use shared_ptr.
This fixes some potential memory leaks and makes Descriptor Set class
lighter weight.
|
|
DescriptrSets used pointers to descriptorsetlayout data, which caused
invalid references if the layouts were deleted before the descriptor
sets. Changed the layer to copy the data.
Change-Id: I671f1efed2aa0986f3a370b51f2f96c07b555af7
|
|
These just added confusion; we already support the !immut case in the other
ctor.
V2: ImageSamplerDescriptor remaining ctor was buggy.
|
|
Convert internal uses of VkDebugReportObjectTypeEXT for the core-
validation layer to use the internal layer-povided object-type.
Also modified tests for changed error text.
Change-Id: If080f4bf452ead0c6fecc648309bfd95b27fc0ce
|
|
This change adds validation to make sure that an image layout at the
time the image is used in a descriptor matches the layout that was
given when the descriptor was updated.
Because image view covers a range of mip levels, loop over each level
and verify layouts one at a time.
Also Updated a number of validate functions to use cont ptr params for
data that they aren't changing.
|
|
Add support for VK_EXT_validation_flags in core_validation.
The only enum currently supported is VK_VALIDATION_CHECK_ALL_EXT which
disables all existing flags in validation. Note that most checks are
still not guarded by flags so that option will only disable the checks
that are guarded by flags.
In testing this I found a bug with AllocateDescriptorSets() where
common state was not updated with the flag enabled so this includes a
fix for that issue as well.
|
|
Change-Id: Ifaa7aea1c7569ffaf5d417a1cd5caadaa38c96b0
|
|
Change-Id: I695cf51b6fa27df7585582f545c0077efb9fd432
|
|
Add "using core_validation::layer_data;" to descriptor and buffer
validation files. This cleans up the code without adding any confusion
or name collisions.
|
|
This adds missing checks for max range for storage and uniform buffer
updates. Also update database file.
|
|
Switch clang-format standard from the LLVM style to the
Google style for more consistency.
Change-Id: I247c4abc275d7873a91522e1e234198adaa24033
|
|
The active bindings set was being passed around but the data is only
used in a couple places and an alternate form of it is available in the
binding->requirement map. Also, the binding set was wrong in that it
stored bindings for all bound sets at draw time, but was being used to
check bindings for individual sets.
|
|
Split ValidateAndUpdateDrawState() to isolate validation and state
updates into ValidateDrawState() & UpdateDrawState() functions.
Refactored CmdDraw() to use Pre/Post patter with all state updates now
occurring in the Post function. Made some initial updates to other
Draw/Dispatch functions to call each new function in-line, but will
refactor these functions to use Pre/Post in follow-on commits.
|
|
Refactor GetConsecutiveDescriptorCountFromBinding() to use the fact
that bindings are now stored in-order. No longer need to chase binding
order through the map, just get current binding index and then parse
rest of the binding array in-order.
|
|
Sort the bindings in the internal data structure of the
DescriptorSetLayout class so that they're stored in binding order.
This commit keeps the interface and mapping structures the same.
Further commits will take more use of the fact that layout is now
stored in binding order.
|
|
Fixes #1165
According to spec descriptor updates should roll over to the next
binding number. If bindings were out of order, this was broken in
validation.
This fix corrects validation and state update for out-of-order
descriptor bindings by checking consecutive updates based on correct
binding count for consecutive bindings and by performing updates
on a per-binding basis, making sure to roll update over to the
correct next binding.
Also update the error message, related negative test, and database
file.
|
|
|
|
Fixes #1162
The dynamic offsets passed in at descriptor bind time are ordered based
on the binding order and any consecutive array indicies within those
bindings. When we validate the dynamic offsets at draw time, we were
using the entire dynamic offset array, but only the active bindings.
If we had an inactive dynamic binding before the end of the bindings
we would use the wrong offsets.
This change fixes the issue by creating a mapping between bindings and
dynamic offset array indicies at descriptor layout creation time. At
draw time the mapping is then used to lookup the correct dynamic offset
array index for a given binding.
|
|
Update CreateDescriptorSetLayout() to use Pre/Post pattern and split
out validation of createInfo for the layout to occur before the
creation of the layout.
|
|
Add pool state to DescriptorSet instead of just the pool.
Then, at bind time, create a dual binding between the cmd buffer
and the pool. This correcly puts pool in-use when cmd buffer is
submitted, as well as flagging cmd buffer as INVALID if/when the
pool is destroyed.
|
|
When creating a DescriptorSet instance, record the pool that the set is
allocated from in a private pool_ variable.
Then, when binding a set to a cmd buffer, also create a binding between
the command buffer and the pool.
This allows us to catch the in-use case when sets are implicitly freed
by calling vkDestroyDescriptorPool().
|
|
Continuing the NODE->STATE renaming effort
|
|
Descriptor validation builds up error strings at multiple levels such as
UpdateError->WriteUpdate->BufferUpdate->BufferOffset. The final error is
then reported via a log_msg() call at the top level.
In order for this design to allow for the new unique error codes, we need
to pass error codes down the chain in the same way we pass error strings
down the chain.
This change adds error msg passing for descriptor updates. Many error
codes are added in as well as comments for codes that are missing or need
to be updated.
The database file is also updated to account for all of the checks that
were updated and/or reviewed.
|
|
NOEXCEPT is defined multiple times
Change-Id: I9aef970e9588c17071cd71a31873db4090d50b07
|
|
Initial batch of updates to use unique validation error enums and
messages for a few checks. Updated the database file and flagged
some other checks that are missing along with "TODO" notes in the
code.
|
|
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>
|
|
When dealing with dynamic offsets, the binding numbers, and array indices within
a binding, are all sequential.
This is according to the spec "Descriptor Set Binding" section which states,
"...entries are ordered by the binding numbers in the descriptor set layouts; and
within a binding array, elements are in order."
This means when processing the binding numbers to validate the dynamic offsets at
draw time, we should do so in order to make sure that the sequential dynamic offset
index correctly correlates with the dynamic offset being processed.
|
|
Update SAMPLER_NODE to inherit from BASE_NODE and keep track of
cb_bindings for sampler.
At draw time, add any bindings between cmd buffer and samplers that
are connected to active descriptors.
At DestroySampler() time, set CB_INVALID for any cmd buffers in
cb_bindings.
Also includes some additional plumbing to prepare for connecting
images/buffers that are tied to descriptor sets to cmd buffers that
those sets are bound to.
|
|
Don't create a binding between every set bound to a cmd buffer, but only
the sets that are verified active at draw time.
Gather up active descriptorset bindings in prepration of also binding the
resources from each individual active set to the cmd buffer.
|
|
This is start of a series intended to enable CB_INVALID tracking for
descriptor sets. Much of the tracking is already in place in the
special-purpose uniqueBoundSets data struct, so I'll be migrating
the tracking from that struct to the more general-purpose
object_bindings set.
|
|
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>
|
|
For a descriptor write update to a buffer type, verify that the contents of
VkDescriptorBufferInfo struct are valid according to valid usage guidelines
of the spec.
Spun off the usage bit validation into its own function ValidateBufferUsage().
Previous ValidateBufferUpdate() function now calls that function as well as
performing all of the checks for the buffer, range, and offset members of
VkDescriptorBufferInfo struct.
|
|
Created a single vector to track any cmd buffer dependencies that are destroyed
and thereby cause the cmd buffer to become invalid. Currently just tracking
the previous object types of descriptor sets and framebuffers, but will update
the tracking to include all cmd buffer dependencies in future commits.
|
|
Prior to calls to get an global index from a binding, make sure that
HasBinding() is called to verify that the binding exists.
Added HasBinding() calls to a couple of validation functions for
early exist.
Updated code comment to indicate that HasBinding() call should
precede GetGlobal*IndexFromBinding() calls.
Added assert() to GetGlobal*IndexFromBinding() calls in the error case
to make error more obvious in debug builds.
Note that Perform*Update() functions already indicate that they should
be preceded by their matching Validate*Update() functions, which include
the appropriate checks for HasBinding().
case the Validate*Update() funciont
|
|
|
|
Remove some unneeded passing of poolMap around and use getPoolNode()
function in DescriptorSet class.
|