| Age | Commit message (Collapse) | Author |
|
Except for swapchain.cpp, which is undergoing a merge into CV.
Change-Id: I8b18518ef662a9a11a808ef3dce1b8f60d858fb3
|
|
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.
|
|
Change-Id: I4d192db22c51d2e9224b74487bfd5d6a58405028
|
|
Split format-related helper fxns out of vk_layer_utils.cpp into a new
file vk_format_utils.cpp. Remove the duplicated fxns in the render
framework and share the new format utils across both projects.
Rename the util fxns into CamelCase per coding std.
Change-Id: I0f9a34bc5931dfca085dfdc8d4800664aec526cf
|
|
Skip checks that no longer apply when VK_KHR_maintenance1 is enabled.
Change-Id: I84d0fe889d0e567045aeb7fa7463dd2ec0d56789
|
|
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: I594243d7879ed9999571c4f185724ba42d2ed7b6
|
|
Change-Id: Ifaa7aea1c7569ffaf5d417a1cd5caadaa38c96b0
|
|
Change-Id: I695cf51b6fa27df7585582f545c0077efb9fd432
|
|
Simplified core_validation->descriptor_sets/buffer_validation.
Change-Id: I6921ac458bce5899e8bd60145bfaa0e0f5e8a2ac
|
|
Add "using core_validation::layer_data;" to descriptor and buffer
validation files. This cleans up the code without adding any confusion
or name collisions.
|
|
Rename get* helper functions to have capital first letter in-line with
coding standard.
|
|
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
|
|
Bring all source files in the repo up to date with consistent
coding style/standard.
Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23
|
|
Remove descriptor set check to make sure that src & dest descriptor
sets of copy update are valid. Object_tracker already verifies this.
|
|
Note a few unique error enum duplicates that should have their own
unique ids added through spec updates.
|
|
Added a number of exceptions for duplicate uses of unique error enums
that are valid. Also added some comments to a few cases that need new
unique ids.
|
|
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.
|
|
Remove valid buffer check from descriptor_sets.cpp that's already
handled in object_tracker.
|
|
Update all of the cases to validate that memory is bound to non-sparse
images and buffers to use the correct unique error id.
|
|
Update descriptor set cases where no memory bound to buffer or image to
use the correct respective unique error ids.
|
|
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.
|
|
Discovered in VS2015.
Change-Id: I2a42209a9ee9bd0e8f3da21c0f1a613315d5a6ce
|
|
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.
|
|
STL min/max functions were causing windows build failures.
Change-Id: Ia153a5d6a3d245b645b5f829c3f076c023d865f1
|
|
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.
|
|
Add appropriate unique error enums to the code for allocating
descriptor sets from a pool without enough sets left and without
enough descriptors left.
These were already flagged as implemented but the enums hadn't been
added to the code.
|
|
These error messages are all amended to error messages that already
include a period at the end so deleting the extra periods.
|
|
Validation error if descriptor update performed on an empty binding.
|
|
From Mikko Strandborg
When a resource gets deleted, any command buffer that references it
gets invalidated, and an error gets thrown whenever that command buffer
is submitted. However, for a developer, it's quite hard to deduce what
exactly caused that to happen. This patch emits a warning whenever a
command buffer that's in CB_RECORDING state (meaning that it has had
its vkBeginCommandBuffer called but not End). This way the developer
can set a breakpoint on that to see exactly what causes the buffer to
be invalidated.
Destroying a resource that's being used in an open command buffer is
almost certainly a bug, but there might still be cases where it might
be valid behavior (for example, when the application decides to abort
an operation), therefore it's not an error but a warning instead.
|
|
|
|
There are a few places in the code where we assume that an image or
buffer doesn't have a sparse binding. These cases break with sparse
bindings.
To fix I added a function to BINDING class to retrieve all memory
bindings and then updated a few spots with bad assumption to make use
of this new GetBoundMemory() function.
|
|
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.
|
|
|
|
Streamline duplicate binding check, use [] operator instead of emplace,
remove dead comment and add new comment.
|
|
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 unique error enum for the case where descriptor bindings are
duplicated.
|
|
Expand abbreviations to improve readability:
DS=depth/stencil
DS=descriptor set
CB=command buffer
VS=vertex shader
FS=fragment shader
VTX=vertex
PSO=pipeline state object
Change-Id: I48fe917aac50d1911fe2a3aa1ed2c739637c7645
|
|
Support for sparse memory binding is virually non-existant in current
validation layers. This is a first step down a long path to improve
sparse binding support.
The BINDABLE superclass is sub-classed by IMAGE & BUFFER state objs
and contains memory binding info in both the single binding and
sparse binding cases.
Bindings are initially encapsulated in the new MEM_BINDING struct.
For single binding cases, things are almost exactly the same as they
have always been. For sparse binding, the various bindings will be
stored in the sparse_bindings set where we initally don't have complete
information on the sparse binding as we only store the MEM_BINDING info
but this is a start.
|
|
Fixes #1053
DescriptorLayout class was incrementing global index for empty bindings
which led to an empty array entry that could cause invalid errors when
updating descriptors.
This change will only increment global index for non-empty bindings.
|
|
Another node->state rename pass.
|
|
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.
|
|
Change some pool_node names to pool_state in DescriptorSet class.
Also update getPool function prototype to the new name of
getDescriptorSetState().
|
|
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
|
|
According to the spec "Load and store operations on storage images can only
be done on images in VK_IMAGE_LAYOUT_GENERAL layout."
This change flags an error if a STORAGE_IMAGE descriptor is updated with an
image layout other than GENERAL.
|
|
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.
|