aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-07-18 14:19:12 -0600
committerTobin Ehlis <tobine@google.com>2016-07-19 13:38:59 -0600
commit57eecdf5eedfefb6779ed8d9707c8f51e0cb36ae (patch)
treebbdf3c9e80ebb91858b4c758257225a9c9923862
parent3d9443e5b53c8c62ffcfe106932729611bf43c7c (diff)
downloadusermoji-57eecdf5eedfefb6779ed8d9707c8f51e0cb36ae.tar.xz
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.
-rw-r--r--layers/core_validation.cpp2
-rw-r--r--layers/core_validation_error_enums.h1
-rw-r--r--layers/vk_validation_layer_details.md3
3 files changed, 2 insertions, 4 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 5cfef40b..58e0ee58 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -5052,7 +5052,7 @@ DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallb
if (item != dev_data->semaphoreMap.end()) {
if (item->second.in_use.load()) {
log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT,
- reinterpret_cast<uint64_t &>(semaphore), __LINE__, DRAWSTATE_INVALID_SEMAPHORE, "DS",
+ reinterpret_cast<uint64_t &>(semaphore), __LINE__, DRAWSTATE_OBJECT_INUSE, "DS",
"Cannot delete semaphore 0x%" PRIx64 " which is in use.", reinterpret_cast<uint64_t &>(semaphore));
}
dev_data->semaphoreMap.erase(semaphore);
diff --git a/layers/core_validation_error_enums.h b/layers/core_validation_error_enums.h
index 7103a30b..058e95f5 100644
--- a/layers/core_validation_error_enums.h
+++ b/layers/core_validation_error_enums.h
@@ -62,7 +62,6 @@ enum DRAW_STATE_ERROR {
DRAWSTATE_INVALID_BUFFER, // Invalid Buffer
DRAWSTATE_INVALID_QUERY, // Invalid Query
DRAWSTATE_INVALID_FENCE, // Invalid Fence
- DRAWSTATE_INVALID_SEMAPHORE, // Invalid Semaphore
DRAWSTATE_INVALID_EVENT, // Invalid Event
DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, // binding in vkCmdBindVertexData() too
// large for PSO's
diff --git a/layers/vk_validation_layer_details.md b/layers/vk_validation_layer_details.md
index 4baa5786..34cf7a99 100644
--- a/layers/vk_validation_layer_details.md
+++ b/layers/vk_validation_layer_details.md
@@ -87,10 +87,9 @@ The Draw State portion of the core validation layer tracks state leading into Dr
| Verify Memory Access Flags/Memory Barriers | Validate correct access flags for memory barriers | INVALID_BARRIER | vkCmdWaitEvents vkCmdPipelineBarrier | InvalidBarriers | None |
| Verify Memory Buffer Not Deleted | Validate Command Buffer not submitted with deleted memory buffer | INVALID_BUFFER | vkQueueSubmit | VertexBufferInvalid | None |
| Verify Memory Buffer Destroy | Validate memory buffers are not destroyed more than once | DOUBLE_DESTROY | vkDestroyBuffer | VertexBufferInvalid | None |
-| Verify Object Not In Use | Validate that object being freed or modified is not in use | OBJECT_INUSE | vkDestroyBuffer vkFreeDescriptorSets vkUpdateDescriptorSets | TODO | Write tests for these cases, currently 2 cases, 1 in validateIdleDescriptorSet() & 1 in validateIdleBuffer() |
+| Verify Object Not In Use | Validate that object being freed or modified is not in use | OBJECT_INUSE | vkDestroyBuffer vkFreeDescriptorSets vkUpdateDescriptorSets vkDestroySemaphore | TODO | Write tests for these cases, currently 3 cases, 1 in validateIdleDescriptorSet(), 1 in validateIdleBuffer(), 1 in DestroySemaphore() |
| Verify Get Queries| Validate that that queries are properly setup, initialized and synchronized | INVALID_QUERY | vkGetFenceStatus vkQueueWaitIdle vkWaitForFences vkDeviceWaitIdle vkCmdBeginQuery vkCmdEndQuery | TODO | Need to check existing case against object_tracker and remove any redundant checks. Then write tests for remaining case. Currently there are 8 cases for this check with 1 each in cleanInFlightCmdBuffer(), EndCommandBuffer(), CmdEndQuery(), validateQuery(), and 4 cases in GetQueryPoolResults() |
| Verify Fences Not In Use | Validate that that fences are not used in multiple submit calls at the same time | INVALID_FENCE | vkQueueSubmit | TODO | Currently 3 cases of this check to be tested, 1 each in ValidateFenceForSubmit(), DestroyFence(), and ResetFences() |
-| Verify Semaphores Not In Use | Validate that the semaphores are not used in multiple submit calls at the same time | INVALID_SEMAPHORE | vkQueueSubmit | TODO | None |
| Verify Events Not In Use | Validate that that events are not used at the time they are destroyed | INVALID_EVENT | vkDestroyEvent | TODO | None |
| Live Semaphore | When waiting on a semaphore, need to make sure that the semaphore is live and therefore can be signalled, otherwise queue is stalled and cannot make forward progress. | QUEUE_FORWARD_PROGRESS | vkQueueSubmit vkQueueBindSparse vkQueuePresentKHR vkAcquireNextImageKHR | TODO | Create test |
| Buffer Alignment | Buffer memory offset in BindBufferMemory must agree with VkMemoryRequirements::alignment returned from a call to vkGetBufferMemoryRequirements with buffer | INVALID_BUFFER_MEMORY_OFFSET | vkBindBufferMemory | VertexBufferInvalid | None |