aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-09-28 14:25:44 -0600
committerTobin Ehlis <tobine@google.com>2016-09-28 17:41:14 -0600
commit2f818fb3b0f1de0b43948b20b1e07d0d52710def (patch)
tree32636a8d6ffc122075e0a803ab6bb05313036af0
parente19078cee14b1a6ad1859b1bbd16ce75ec52030b (diff)
downloadusermoji-2f818fb3b0f1de0b43948b20b1e07d0d52710def.tar.xz
layers: Added flags for in_use checks
Added object_in_use flag to disable all in_use checks. Added destroy_buffer_view flag to disable validation checks at DestroyBufferView() time.
-rw-r--r--layers/core_validation.cpp4
-rw-r--r--layers/core_validation.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index a93726d7..1edaa2ce 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -5404,6 +5404,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyFence(VkDevice device, VkFence fence, const Vk
// For given obj node, if it is use, flag a validation error and return callback result, else return false
bool ValidateObjectNotInUse(const layer_data *dev_data, BASE_NODE *obj_node, VK_OBJECT obj_struct) {
+ if (dev_data->instance_state->disabled.object_in_use)
+ return false;
bool skip = false;
if (obj_node->in_use.load()) {
skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, obj_struct.type, obj_struct.handle, __LINE__,
@@ -5723,6 +5725,8 @@ VKAPI_ATTR void VKAPI_CALL DestroyBuffer(VkDevice device, VkBuffer buffer,
static bool PreCallValidateDestroyBufferView(layer_data *dev_data, VkBufferView buffer_view, BUFFER_VIEW_STATE **buffer_view_state,
VK_OBJECT *obj_struct) {
+ if (dev_data->instance_state->disabled.destroy_buffer_view)
+ return false;
bool skip = false;
*buffer_view_state = getBufferViewState(dev_data, buffer_view);
if (buffer_view_state) {
diff --git a/layers/core_validation.h b/layers/core_validation.h
index 69095404..95ce8ba7 100644
--- a/layers/core_validation.h
+++ b/layers/core_validation.h
@@ -68,6 +68,8 @@
*/
struct CHECK_DISABLED {
bool command_buffer_state;
+ bool destroy_buffer_view; // Skip validation at DestroyBufferView time
+ bool object_in_use; // Skip all object in_use checking
};
#if MTMERGE