| Age | Commit message (Collapse) | Author |
|
If a DS image is used in a descriptor, regardless of the underlying
image layout, we need to validate that BOTH DEPTH and STENCIL aspect
bits are NOT set. Only one of the two bits is allowed.
|
|
When creating descriptor set layout, we were only incrementing the dynamic descriptor
count by 1 regardless of the number of descriptors in a binding. This fix increments
the count by the number of descriptors in the binding.
|
|
Remove some unneeded passing of poolMap around and use getPoolNode()
function in DescriptorSet class.
|
|
Added getSwapchainNode() helper to core_validation and update
DescriptorSet class to use it.
|
|
Add getSwapchainFromImage() to core_validation and use it from
DescriptorSet class.
|
|
|
|
Add getImageNode() helper to core_validation and use it.
Also update DescriptorSet class to use the helper and kill
its image_map member.
|
|
Switch imageViewMap to store unique_ptrs. Add getImageViewDate() helper
to core_validation and update DescriptorSet to use it.
|
|
Kill sampler_map_ in DescriptorSet and add getSamplerNode() helper
and use it instead.
|
|
Add helper function to core_validation for bufferViewMap look-ups
and use the helper in DescriptorSet class.
|
|
Standardize core_validation use of getMemObjInfo() and update
DescriptorSet class to use it as well.
|
|
Move core_validation bufferMap to use unique_ptr to BUFFER_NODE.
Perform bufferMap look-ups using getBufferNode() helper function.
Update DescriptorSet class to use getBufferNode() helper and store
layer_data instead of bufferMap.
|
|
This is the start of migrating core_validation::layer_data to be
visible in DescriptorSet class.
DescriptorSet class can't see the contents of layer_data, so it also
needs the get<Object>() helper functions to look up items from the
maps. This first change only brings along getSetNode() utility
function so only set_map references can be removed.
Will add follow-on CLs to remove more maps from DescriptorSet class
and bring in more utility functions.
|
|
With the break between PreValidate* and PostRecord* calls in the layers
we can suffer having to do some repeat work in the Post step. In order
to prevent this, this CL slightly modifies the interface to pass common
data between the pre/post calls in a custom AllocateDescriptorSetsData
struct.
I initially attempted to fill this data in a separate function that
would preceed the PreValidate* call, but such a function would need to
include some validation as it includes map checks which may fail.
The simplest solution, then, seems to be passing a ptr to the common
data to the PreValidate* function who then fills the data. If the
validation and call down the chain succeed, the PostRecord* function
then takes a ptr to the common data to prevent having to redo the
work that was done at validation time.
|
|
Create a top-level "Validate" and "Perform" interface for the
vkAllocateDescriptorSets() function in DescriptorSet class.
Refactor AllocateDescriptorSets() in core_validation to use the
new interface. All checks are now performed in a "Pre" function
and all state updates are recorded in a "Post" function.
|
|
|
|
More cases where "else" blocks weren't needed because the
"if" block returns.
|
|
Add buffer usage bit validation for descriptor copy updates.
Pass down known descriptor type to copy validate function to
avoid having to look it up again.
Fix various incorrect "write" references in the copy update
error messages.
|
|
The "if" case returns so no need for this else block or the indentation
that it includes.
|
|
Verify that buffer used to update all buffer descriptor types (texel or
general) has the correct usage bits set.
descriptor
|
|
Verify that images used in imageView that's passed to various image
descriptor types have the correct usage bits set.
|
|
Doesn't win us anything to use emplace_back to invoke a copy
constructor. Construct the unique_ptr from raw ptr in-place instead.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
|
|
We do it properly now.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
|
|
Minor formatting improvements, removed some useless "const" decls
and unused vars and updated a few error codes to be more appropriate.
|
|
Before verifying source update comments make sure that the source
descriptors have been updated. This guards against some obscure
corner cases where a bad source descriptor could slip through the
content verification.
|
|
Mainly refactor and moving code in order to provide an interface to
DescriptorSet class that matches top-level vkUpdateDescriptorSets()
function.
Split the validation of an update as a separate task from performing
the update. This allows validation prior to calling down the chain
and then only update the state if validation is clean.
Hoisted all of the update validation into the DescriptorSet class
which prevents having to copy all of the maps into the individual
Descriptor classes. This simplifies both their creation and updating
their contents.
Updated the top-level core_validation UpdateDescriptorSets() code
to match Vulkan Validation Layer Authoring Guidelines. As this is
an initial POC for the architecture, I kept the Pre* & Post* functions
in the core_validation.cpp file, but they should eventually be spun
out.
|
|
Create private helper function InvalidateBoundCmdBuffers() within the
DescriptorSet class to unify invalidate cases due to set being updated
or freed.
Add a destructor for DescriptorSet to make sure that no bound cmd buffers
hang on to deleted set references.
|
|
This migrates code for DescriptorSet in_use and flagging bound
command buffers as invalid from core_validation.cpp into DescriptorSet
class.
|
|
This was in the DescriptorSet class, but really belonged in the Layer.
There was also a bug where it did not correctly handle the case of an
initial offset that oversteps the size of the first binding being updated.
That is legal according to the spec so added code to handle that case by
walking the bindings until we get to the actual binding on which the first
update will occur.
|
|
Kill the ptr to safe_VkDescriptorSetLayoutBinding in DescriptorSetLayout
class. This saves us the "new" and the need for a custom destructor.
Couldn't do this initially but I've since added copy constructors
to all of the safe_* struct types.
|
|
All of the functionality that I thought I would need this for is contained
in the ValidateDrawState() function.
|
|
I originally added this thinking it would be useful but currently
unused and not correctly tracked so just killing it.
|
|
|
|
Migrate a number of unneccessary .at() calls to just use [] operator.
Also replace push_back() calls at descriptor creation time with emplace_back().
|
|
This change pulls all of the DescriptorSet code out of core_validation.cpp and into
its own files/classes in descriptor_set.h/cpp.
See header file for complete class documentation.
These changes pass tri/cube/smoketest --validate.
All related layer validation tests are also updated and passing.
Finally, I ran it through mustpass CTS and did not hit any issues related to these changes.
These changes not only update the descriptor interface but fix some known lingering
bugs with how descriptor updates occurred. This includes now correctly handling
updates that cross binding boundaries and updates that write a subset of a binding.
Going forward this is a general outline for how we would like to evolve core_validation.
That is, we'd like to move the functionality of the checks into reasonable classes and
just have core_validation call into those classes to do the majority of the work.
|