diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-04-19 08:15:03 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-04-20 07:31:53 -0600 |
| commit | f4c61aafdd4c22f308e37eaaec7156d8c70b4fce (patch) | |
| tree | d5836841bddd43a6d6e180f8a64d8f9551fc8f20 /layers/core_validation.h | |
| parent | b34e816d8512ae285a49feabb34980895cfc38ea (diff) | |
| download | usermoji-f4c61aafdd4c22f308e37eaaec7156d8c70b4fce.tar.xz | |
layers: GH384 Fix descriptor update check for immutable samplers
If a descriptor is an immutable sampler of type VK_DESCRIPTOR_TYPE_SAMPLER
then it doesn't need to be explicitly updated so don't flag errors in this case.
Diffstat (limited to 'layers/core_validation.h')
| -rw-r--r-- | layers/core_validation.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/layers/core_validation.h b/layers/core_validation.h index 853c87fd..0831c775 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -638,6 +638,7 @@ typedef struct _LAYOUT_NODE { uint32_t endIndex; // last index of this layout uint32_t dynamicDescriptorCount; // Total count of dynamic descriptors used // by this layout + uint32_t immutableSamplerCount; // # of immutable samplers in this layout vector<VkDescriptorType> descriptorTypes; // Type per descriptor in this // layout to verify correct // updates @@ -646,7 +647,7 @@ typedef struct _LAYOUT_NODE { unordered_map<uint32_t, uint32_t> bindingToIndexMap; // map set binding # to // createInfo.pBindings index // Default constructor - _LAYOUT_NODE() : layout{}, createInfo{}, startIndex(0), endIndex(0), dynamicDescriptorCount(0){}; + _LAYOUT_NODE() : layout{}, createInfo{}, startIndex(0), endIndex(0), dynamicDescriptorCount(0), immutableSamplerCount(0){}; } LAYOUT_NODE; // Store layouts and pushconstants for PipelineLayout @@ -668,7 +669,9 @@ class SET_NODE : public BASE_NODE { LAYOUT_NODE *pLayout; // Layout for this set SET_NODE *pNext; unordered_set<VkCommandBuffer> boundCmdBuffers; // Cmd buffers that this set has been bound to - SET_NODE() : set(VK_NULL_HANDLE), pool(VK_NULL_HANDLE), pUpdateStructs(nullptr), pLayout(nullptr), pNext(nullptr){}; + SET_NODE() + : set(VK_NULL_HANDLE), pool(VK_NULL_HANDLE), pUpdateStructs(nullptr), descriptorCount(0), pLayout(nullptr), + pNext(nullptr){}; }; typedef struct _DESCRIPTOR_POOL_NODE { |
