From c9b557f81aa5e480823e8051ea1663cacb8668c4 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 14 Sep 2016 11:21:55 -0600 Subject: layers: Add support code to handle in_use for missing objects Add case block to in-use Increment/Decrement functions to handle the missing object types that may be bound to a command buffer. The actual bindings for these missing types will be added in a future commit. Here are the types that were added: VkBufferView VkImageView VkDescriptorPool VkCommandPool VkFramebuffer VkRenderPass VkDeviceMemory Also added new error enums for all of these type except RENDERPASS which already had an appropriate error enum. Unify object BASE_NODE look-up for removeCommandBufferBinding() and DecrementBoundResources() to use common GetStateStructPtrFromObject() function. Finally, had to update the state-wrapping class for DescriptorPool, DeviceMemory and RenderPass to derive from BASE_NODE so that in_use can be tracked. --- layers/core_validation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layers/core_validation.h') diff --git a/layers/core_validation.h b/layers/core_validation.h index d7374f6c..aa3058ed 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -176,7 +176,7 @@ class QUERY_POOL_NODE : public BASE_NODE { VkQueryPoolCreateInfo createInfo; }; -class FRAMEBUFFER_NODE : BASE_NODE { +class FRAMEBUFFER_NODE : public BASE_NODE { public: using BASE_NODE::in_use; using BASE_NODE::cb_bindings; @@ -196,7 +196,7 @@ typedef struct stencil_data { } CBStencilData; // Track command pools and their command buffers -struct COMMAND_POOL_NODE { +struct COMMAND_POOL_NODE : public BASE_NODE { VkCommandPoolCreateFlags createFlags; uint32_t queueFamilyIndex; // TODO: why is this std::list? -- cgit v1.2.3