blob: 866de8c9dd519b4a8d06778ba0cbd2262f036854 [file] [log] [blame]
Tobin Ehlis2d9deec2016-04-21 14:19:26 -06001/* Copyright (c) 2015-2016 The Khronos Group Inc.
2 * Copyright (c) 2015-2016 Valve Corporation
3 * Copyright (c) 2015-2016 LunarG, Inc.
4 * Copyright (C) 2015-2016 Google Inc.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * Author: Tobin Ehlis <tobine@google.com>
John Zulaufc483f442017-12-15 14:02:06 -070019 * John Zulauf <jzulauf@lunarg.com>
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060020 */
21#ifndef CORE_VALIDATION_DESCRIPTOR_SETS_H_
22#define CORE_VALIDATION_DESCRIPTOR_SETS_H_
23
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060024#include "core_validation_error_enums.h"
Tobin Ehlisbf98b692016-10-06 12:58:06 -060025#include "vk_validation_error_messages.h"
Tobin Ehlis0a43bde2016-05-03 08:31:08 -060026#include "core_validation_types.h"
John Zulaufd47d0612018-02-16 13:00:34 -070027#include "hash_vk_types.h"
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060028#include "vk_layer_logging.h"
Tobin Ehlis0a43bde2016-05-03 08:31:08 -060029#include "vk_layer_utils.h"
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060030#include "vk_safe_struct.h"
31#include "vulkan/vk_layer.h"
Mark Lobodzinski33826372017-04-13 11:10:11 -060032#include "vk_object_types.h"
Tobin Ehliscebc4c02016-08-22 10:10:43 -060033#include <map>
Tobin Ehlis0a43bde2016-05-03 08:31:08 -060034#include <memory>
John Zulaufb6d71202017-12-22 16:47:09 -070035#include <set>
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060036#include <unordered_map>
Tobin Ehlis0a43bde2016-05-03 08:31:08 -060037#include <unordered_set>
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060038#include <vector>
39
Tobin Ehlis58c884f2017-02-08 12:15:27 -070040using core_validation::layer_data;
41
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060042// Descriptor Data structures
John Zulaufc483f442017-12-15 14:02:06 -070043namespace cvdescriptorset {
44
John Zulauf48a6a702017-12-22 17:14:54 -070045// Utility structs/classes/types
John Zulaufc483f442017-12-15 14:02:06 -070046// Index range for global indices below, end is exclusive, i.e. [start,end)
47struct IndexRange {
48 IndexRange(uint32_t start_in, uint32_t end_in) : start(start_in), end(end_in) {}
49 IndexRange() = default;
50 uint32_t start;
51 uint32_t end;
52};
John Zulauf48a6a702017-12-22 17:14:54 -070053typedef std::map<uint32_t, descriptor_req> BindingReqMap;
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060054
55/*
John Zulauf34ebf272018-02-16 13:08:47 -070056 * DescriptorSetLayoutDef/DescriptorSetLayout classes
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060057 *
John Zulauf34ebf272018-02-16 13:08:47 -070058 * Overview - These two classes encapsulate the Vulkan VkDescriptorSetLayout data (layout).
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060059 * A layout consists of some number of bindings, each of which has a binding#, a
60 * type, descriptor count, stage flags, and pImmutableSamplers.
John Zulauf34ebf272018-02-16 13:08:47 -070061
62 * The DescriptorSetLayoutDef represents a canonicalization of the input data and contains
63 * neither per handle or per device state. It is possible for different handles on
64 * different devices to share a common def. This is used and useful for quick compatibiltiy
65 * validation. The DescriptorSetLayout refers to a DescriptorSetLayoutDef and contains
66 * all per handle state.
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060067 *
68 * Index vs Binding - A layout is created with an array of VkDescriptorSetLayoutBinding
69 * where each array index will have a corresponding binding# that is defined in that struct.
Tobin Ehlis9637fb22016-12-12 15:59:34 -070070 * The binding#, then, is decoupled from VkDescriptorSetLayoutBinding index, which allows
71 * bindings to be defined out-of-order. This DescriptorSetLayout class, however, stores
72 * the bindings internally in-order. This is useful for operations which may "roll over"
73 * from a single binding to the next consecutive binding.
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060074 *
Tobin Ehlis9637fb22016-12-12 15:59:34 -070075 * Note that although the bindings are stored in-order, there still may be "gaps" in the
76 * binding#. For example, if the binding creation order is 8, 7, 10, 3, 4, then the
77 * internal binding array will have five entries stored in binding order 3, 4, 7, 8, 10.
78 * To process all of the bindings in a layout you can iterate from 0 to GetBindingCount()
79 * and use the Get*FromIndex() functions for each index. To just process a single binding,
80 * use the Get*FromBinding() functions.
81 *
82 * Global Index - The binding vector index has as many indices as there are bindings.
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060083 * This class also has the concept of a Global Index. For the global index functions,
84 * there are as many global indices as there are descriptors in the layout.
85 * For the global index, consider all of the bindings to be a flat array where
Tobin Ehlis9637fb22016-12-12 15:59:34 -070086 * descriptor 0 of of the lowest binding# is index 0 and each descriptor in the layout
87 * increments from there. So if the lowest binding# in this example had descriptorCount of
88 * 10, then the GlobalStartIndex of the 2nd lowest binding# will be 10 where 0-9 are the
89 * global indices for the lowest binding#.
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060090 */
John Zulauf1f8174b2018-02-16 12:58:37 -070091class DescriptorSetLayoutDef {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -070092 public:
Tobin Ehlis2d9deec2016-04-21 14:19:26 -060093 // Constructors and destructor
John Zulauf1f8174b2018-02-16 12:58:37 -070094 DescriptorSetLayoutDef(const VkDescriptorSetLayoutCreateInfo *p_create_info);
95 size_t hash() const;
96
Tobin Ehlis0a43bde2016-05-03 08:31:08 -060097 uint32_t GetTotalDescriptorCount() const { return descriptor_count_; };
98 uint32_t GetDynamicDescriptorCount() const { return dynamic_descriptor_count_; };
Józef Kucia1bb00972017-09-10 11:24:08 +020099 VkDescriptorSetLayoutCreateFlags GetCreateFlags() const { return flags_; }
Tobin Ehlisf922ef82016-11-30 10:19:14 -0700100 // For a given binding, return the number of descriptors in that binding and all successive bindings
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600101 uint32_t GetBindingCount() const { return binding_count_; };
John Zulaufb6d71202017-12-22 16:47:09 -0700102 // Non-empty binding numbers in order
103 const std::set<uint32_t> &GetSortedBindingSet() const { return non_empty_bindings_; }
Tobin Ehlis2d9deec2016-04-21 14:19:26 -0600104 // Return true if given binding is present in this layout
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600105 bool HasBinding(const uint32_t binding) const { return binding_to_index_map_.count(binding) > 0; };
Tobin Ehlisb1861d92017-07-06 16:50:10 -0600106 // Return true if this layout is compatible with passed in layout from a pipelineLayout,
Tobin Ehlis2d9deec2016-04-21 14:19:26 -0600107 // else return false and update error_msg with description of incompatibility
John Zulauf1f8174b2018-02-16 12:58:37 -0700108 bool IsCompatible(VkDescriptorSetLayout, VkDescriptorSetLayout, DescriptorSetLayoutDef const *const, std::string *) const;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600109 // Return true if binding 1 beyond given exists and has same type, stageFlags & immutable sampler use
110 bool IsNextBindingConsistent(const uint32_t) const;
John Zulaufb6d71202017-12-22 16:47:09 -0700111 uint32_t GetIndexFromBinding(uint32_t binding) const;
Tobin Ehlis2d9deec2016-04-21 14:19:26 -0600112 // Various Get functions that can either be passed a binding#, which will
Tobin Ehlis9637fb22016-12-12 15:59:34 -0700113 // be automatically translated into the appropriate index, or the index# can be passed in directly
John Zulaufb6d71202017-12-22 16:47:09 -0700114 uint32_t GetMaxBinding() const { return bindings_[bindings_.size() - 1].binding; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600115 VkDescriptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromIndex(const uint32_t) const;
John Zulaufb6d71202017-12-22 16:47:09 -0700116 VkDescriptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromBinding(uint32_t binding) const {
117 return GetDescriptorSetLayoutBindingPtrFromIndex(GetIndexFromBinding(binding));
118 }
John Zulauf1f8174b2018-02-16 12:58:37 -0700119 const std::vector<safe_VkDescriptorSetLayoutBinding> &GetBindings() const { return bindings_; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600120 uint32_t GetDescriptorCountFromIndex(const uint32_t) const;
John Zulaufb6d71202017-12-22 16:47:09 -0700121 uint32_t GetDescriptorCountFromBinding(const uint32_t binding) const {
122 return GetDescriptorCountFromIndex(GetIndexFromBinding(binding));
123 }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600124 VkDescriptorType GetTypeFromIndex(const uint32_t) const;
John Zulaufb6d71202017-12-22 16:47:09 -0700125 VkDescriptorType GetTypeFromBinding(const uint32_t binding) const { return GetTypeFromIndex(GetIndexFromBinding(binding)); }
126 VkShaderStageFlags GetStageFlagsFromIndex(const uint32_t) const;
127 VkShaderStageFlags GetStageFlagsFromBinding(const uint32_t binding) const {
128 return GetStageFlagsFromIndex(GetIndexFromBinding(binding));
129 }
130 uint32_t GetIndexFromGlobalIndex(const uint32_t global_index) const;
131 VkDescriptorType GetTypeFromGlobalIndex(const uint32_t global_index) const {
132 return GetTypeFromIndex(GetIndexFromGlobalIndex(global_index));
133 }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600134 VkSampler const *GetImmutableSamplerPtrFromBinding(const uint32_t) const;
135 VkSampler const *GetImmutableSamplerPtrFromIndex(const uint32_t) const;
Tobin Ehlisa3525e02016-11-17 10:50:52 -0700136 // For a given binding and array index, return the corresponding index into the dynamic offset array
137 int32_t GetDynamicOffsetIndexFromBinding(uint32_t binding) const {
138 auto dyn_off = binding_to_dynamic_array_idx_map_.find(binding);
139 if (dyn_off == binding_to_dynamic_array_idx_map_.end()) {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700140 assert(0); // Requesting dyn offset for invalid binding/array idx pair
Tobin Ehlisa3525e02016-11-17 10:50:52 -0700141 return -1;
142 }
143 return dyn_off->second;
144 }
John Zulaufc483f442017-12-15 14:02:06 -0700145 // For a particular binding, get the global index range
146 // This call should be guarded by a call to "HasBinding(binding)" to verify that the given binding exists
147 const IndexRange &GetGlobalIndexRangeFromBinding(const uint32_t) const;
148
Mark Lobodzinski4aa479d2017-03-10 09:14:00 -0700149 // Helper function to get the next valid binding for a descriptor
150 uint32_t GetNextValidBinding(const uint32_t) const;
Tobin Ehlis1f946f82016-05-05 12:03:44 -0600151 // For a particular binding starting at offset and having update_count descriptors
152 // updated, verify that for any binding boundaries crossed, the update is consistent
153 bool VerifyUpdateConsistency(uint32_t, uint32_t, uint32_t, const char *, const VkDescriptorSet, std::string *) const;
Józef Kuciaf0c94d42017-10-25 22:15:22 +0200154 bool IsPushDescriptor() const { return GetCreateFlags() & VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR; };
Tobin Ehlis2d9deec2016-04-21 14:19:26 -0600155
John Zulauf48a6a702017-12-22 17:14:54 -0700156 struct BindingTypeStats {
157 uint32_t dynamic_buffer_count;
158 uint32_t non_dynamic_buffer_count;
159 uint32_t image_sampler_count;
160 };
161 const BindingTypeStats &GetBindingTypeStats() const { return binding_type_stats_; }
162
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700163 private:
John Zulauf1f8174b2018-02-16 12:58:37 -0700164 // Only the first two are needed for hash and equality checks, the other fields are derivative them uniquely
165 VkDescriptorSetLayoutCreateFlags flags_;
166 std::vector<safe_VkDescriptorSetLayoutBinding> bindings_;
167
168 // Convenience data structures for rapid lookup of various descriptor set layout properties
John Zulaufb6d71202017-12-22 16:47:09 -0700169 std::set<uint32_t> non_empty_bindings_; // Containing non-emtpy bindings in numerical order
170 std::unordered_map<uint32_t, uint32_t> binding_to_index_map_;
171 // The following map allows an non-iterative lookup of a binding from a global index...
172 std::map<uint32_t, uint32_t> global_start_to_index_map_; // The index corresponding for a starting global (descriptor) index
John Zulaufc483f442017-12-15 14:02:06 -0700173 std::unordered_map<uint32_t, IndexRange> binding_to_global_index_range_map_; // range is exclusive of .end
Tobin Ehlisa3525e02016-11-17 10:50:52 -0700174 // For a given binding map to associated index in the dynamic offset array
175 std::unordered_map<uint32_t, uint32_t> binding_to_dynamic_array_idx_map_;
John Zulauf1f8174b2018-02-16 12:58:37 -0700176
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700177 uint32_t binding_count_; // # of bindings in this layout
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700178 uint32_t descriptor_count_; // total # descriptors in this layout
Tobin Ehlis2d9deec2016-04-21 14:19:26 -0600179 uint32_t dynamic_descriptor_count_;
John Zulauf48a6a702017-12-22 17:14:54 -0700180 BindingTypeStats binding_type_stats_;
Tobin Ehlis2d9deec2016-04-21 14:19:26 -0600181};
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600182
John Zulaufd47d0612018-02-16 13:00:34 -0700183static bool operator==(const DescriptorSetLayoutDef &lhs, const DescriptorSetLayoutDef &rhs) {
184 return (lhs.GetCreateFlags() == rhs.GetCreateFlags()) && (lhs.GetBindings() == rhs.GetBindings());
185}
186
John Zulauf34ebf272018-02-16 13:08:47 -0700187// Canonical dictionary of DSL definitions -- independent of device or handle
188using DescriptorSetLayoutDict = hash_util::Dictionary<DescriptorSetLayoutDef, hash_util::HasHashMember<DescriptorSetLayoutDef>>;
189using DescriptorSetLayoutId = DescriptorSetLayoutDict::Id;
John Zulauf1f8174b2018-02-16 12:58:37 -0700190
191class DescriptorSetLayout {
192 public:
193 // Constructors and destructor
194 DescriptorSetLayout(const VkDescriptorSetLayoutCreateInfo *p_create_info, const VkDescriptorSetLayout layout);
195 // Validate create info - should be called prior to creation
196 static bool ValidateCreateInfo(const debug_report_data *, const VkDescriptorSetLayoutCreateInfo *, const bool, const uint32_t);
197 bool HasBinding(const uint32_t binding) const { return layout_id_->HasBinding(binding); }
198 // Return true if this layout is compatible with passed in layout from a pipelineLayout,
199 // else return false and update error_msg with description of incompatibility
200 bool IsCompatible(DescriptorSetLayout const *const, std::string *) const;
201 // Straightforward Get functions
202 VkDescriptorSetLayout GetDescriptorSetLayout() const { return layout_; };
203 bool IsDestroyed() const { return layout_destroyed_; }
204 void MarkDestroyed() { layout_destroyed_ = true; }
205 const DescriptorSetLayoutDef *get_layout_def() const { return layout_id_.get(); }
John Zulauf34ebf272018-02-16 13:08:47 -0700206 DescriptorSetLayoutId get_layout_id() const { return layout_id_; }
John Zulauf1f8174b2018-02-16 12:58:37 -0700207 uint32_t GetTotalDescriptorCount() const { return layout_id_->GetTotalDescriptorCount(); };
208 uint32_t GetDynamicDescriptorCount() const { return layout_id_->GetDynamicDescriptorCount(); };
209 uint32_t GetBindingCount() const { return layout_id_->GetBindingCount(); };
210 VkDescriptorSetLayoutCreateFlags GetCreateFlags() const { return layout_id_->GetCreateFlags(); }
211 bool IsNextBindingConsistent(const uint32_t) const;
212 uint32_t GetIndexFromBinding(uint32_t binding) const { return layout_id_->GetIndexFromBinding(binding); }
213 // Various Get functions that can either be passed a binding#, which will
214 // be automatically translated into the appropriate index, or the index# can be passed in directly
215 uint32_t GetMaxBinding() const { return layout_id_->GetMaxBinding(); }
216 VkDescriptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromIndex(const uint32_t index) const {
217 return layout_id_->GetDescriptorSetLayoutBindingPtrFromIndex(index);
218 }
219 VkDescriptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromBinding(uint32_t binding) const {
220 return layout_id_->GetDescriptorSetLayoutBindingPtrFromBinding(binding);
221 }
222 const std::vector<safe_VkDescriptorSetLayoutBinding> &GetBindings() const { return layout_id_->GetBindings(); }
223 uint32_t GetDescriptorCountFromIndex(const uint32_t index) const { return layout_id_->GetDescriptorCountFromIndex(index); }
224 uint32_t GetDescriptorCountFromBinding(const uint32_t binding) const {
225 return layout_id_->GetDescriptorCountFromBinding(binding);
226 }
227 VkDescriptorType GetTypeFromIndex(const uint32_t index) const { return layout_id_->GetTypeFromIndex(index); }
228 VkDescriptorType GetTypeFromBinding(const uint32_t binding) const { return layout_id_->GetTypeFromBinding(binding); }
229 VkShaderStageFlags GetStageFlagsFromIndex(const uint32_t index) const { return layout_id_->GetStageFlagsFromIndex(index); }
230 VkShaderStageFlags GetStageFlagsFromBinding(const uint32_t binding) const {
231 return layout_id_->GetStageFlagsFromBinding(binding);
232 }
233 uint32_t GetIndexFromGlobalIndex(const uint32_t global_index) const {
234 return layout_id_->GetIndexFromGlobalIndex(global_index);
235 }
236 VkDescriptorType GetTypeFromGlobalIndex(const uint32_t global_index) const {
237 return GetTypeFromIndex(GetIndexFromGlobalIndex(global_index));
238 }
239 VkSampler const *GetImmutableSamplerPtrFromBinding(const uint32_t binding) const {
240 return layout_id_->GetImmutableSamplerPtrFromBinding(binding);
241 }
242 VkSampler const *GetImmutableSamplerPtrFromIndex(const uint32_t index) const {
243 return layout_id_->GetImmutableSamplerPtrFromIndex(index);
244 }
245 // For a given binding and array index, return the corresponding index into the dynamic offset array
246 int32_t GetDynamicOffsetIndexFromBinding(uint32_t binding) const {
247 return layout_id_->GetDynamicOffsetIndexFromBinding(binding);
248 }
249 // For a particular binding, get the global index range
250 // This call should be guarded by a call to "HasBinding(binding)" to verify that the given binding exists
251 const IndexRange &GetGlobalIndexRangeFromBinding(const uint32_t binding) const {
252 return layout_id_->GetGlobalIndexRangeFromBinding(binding);
253 }
254 // Helper function to get the next valid binding for a descriptor
255 uint32_t GetNextValidBinding(const uint32_t binding) const { return layout_id_->GetNextValidBinding(binding); }
256 // For a particular binding starting at offset and having update_count descriptors
257 // updated, verify that for any binding boundaries crossed, the update is consistent
258 bool VerifyUpdateConsistency(uint32_t current_binding, uint32_t offset, uint32_t update_count, const char *type,
259 const VkDescriptorSet set, std::string *error_msg) const {
260 return layout_id_->VerifyUpdateConsistency(current_binding, offset, update_count, type, set, error_msg);
261 }
262 bool IsPushDescriptor() const { return layout_id_->IsPushDescriptor(); }
263
264 using BindingTypeStats = DescriptorSetLayoutDef::BindingTypeStats;
265 const BindingTypeStats &GetBindingTypeStats() const { return layout_id_->GetBindingTypeStats(); }
266
267 private:
268 VkDescriptorSetLayout layout_;
269 bool layout_destroyed_;
270 DescriptorSetLayoutId layout_id_;
271};
272
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600273/*
274 * Descriptor classes
275 * Descriptor is an abstract base class from which 5 separate descriptor types are derived.
276 * This allows the WriteUpdate() and CopyUpdate() operations to be specialized per
277 * descriptor type, but all descriptors in a set can be accessed via the common Descriptor*.
278 */
279
280// Slightly broader than type, each c++ "class" will has a corresponding "DescriptorClass"
Mark Lobodzinski0978f5f2016-05-19 17:23:38 -0600281enum DescriptorClass { PlainSampler, ImageSampler, Image, TexelBuffer, GeneralBuffer };
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600282
283class Descriptor {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700284 public:
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600285 virtual ~Descriptor(){};
Tobin Ehlis300888c2016-05-18 13:43:26 -0600286 virtual void WriteUpdate(const VkWriteDescriptorSet *, const uint32_t) = 0;
287 virtual void CopyUpdate(const Descriptor *) = 0;
Tobin Ehlis8020eea2016-08-17 11:10:41 -0600288 // Create binding between resources of this descriptor and given cb_node
289 virtual void BindCommandBuffer(const core_validation::layer_data *, GLOBAL_CB_NODE *) = 0;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600290 virtual DescriptorClass GetClass() const { return descriptor_class; };
291 // Special fast-path check for SamplerDescriptors that are immutable
292 virtual bool IsImmutableSampler() const { return false; };
293 // Check for dynamic descriptor type
294 virtual bool IsDynamic() const { return false; };
295 // Check for storage descriptor type
296 virtual bool IsStorage() const { return false; };
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700297 bool updated; // Has descriptor been updated?
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600298 DescriptorClass descriptor_class;
299};
300// Shared helper functions - These are useful because the shared sampler image descriptor type
301// performs common functions with both sampler and image descriptors so they can share their common functions
Tobin Ehlise2f80292016-06-02 10:08:53 -0600302bool ValidateSampler(const VkSampler, const core_validation::layer_data *);
Tobin Ehlis75f04ec2016-10-06 17:43:11 -0600303bool ValidateImageUpdate(VkImageView, VkImageLayout, VkDescriptorType, const core_validation::layer_data *,
304 UNIQUE_VALIDATION_ERROR_CODE *, std::string *);
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600305
306class SamplerDescriptor : public Descriptor {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700307 public:
Tobin Ehlis300888c2016-05-18 13:43:26 -0600308 SamplerDescriptor(const VkSampler *);
309 void WriteUpdate(const VkWriteDescriptorSet *, const uint32_t) override;
310 void CopyUpdate(const Descriptor *) override;
Tobin Ehlis8020eea2016-08-17 11:10:41 -0600311 void BindCommandBuffer(const core_validation::layer_data *, GLOBAL_CB_NODE *) override;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600312 virtual bool IsImmutableSampler() const override { return immutable_; };
Tobin Ehlis300888c2016-05-18 13:43:26 -0600313 VkSampler GetSampler() const { return sampler_; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600314
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700315 private:
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600316 // bool ValidateSampler(const VkSampler) const;
317 VkSampler sampler_;
318 bool immutable_;
Tobin Ehlis546326f2016-04-26 11:06:05 -0600319};
320
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600321class ImageSamplerDescriptor : public Descriptor {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700322 public:
Tobin Ehlis300888c2016-05-18 13:43:26 -0600323 ImageSamplerDescriptor(const VkSampler *);
324 void WriteUpdate(const VkWriteDescriptorSet *, const uint32_t) override;
325 void CopyUpdate(const Descriptor *) override;
Tobin Ehlis8020eea2016-08-17 11:10:41 -0600326 void BindCommandBuffer(const core_validation::layer_data *, GLOBAL_CB_NODE *) override;
Tobin Ehlisc9625152016-05-24 16:47:36 -0600327 virtual bool IsImmutableSampler() const override { return immutable_; };
Tobin Ehlis300888c2016-05-18 13:43:26 -0600328 VkSampler GetSampler() const { return sampler_; }
329 VkImageView GetImageView() const { return image_view_; }
330 VkImageLayout GetImageLayout() const { return image_layout_; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600331
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700332 private:
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600333 VkSampler sampler_;
334 bool immutable_;
335 VkImageView image_view_;
336 VkImageLayout image_layout_;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600337};
338
339class ImageDescriptor : public Descriptor {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700340 public:
Tobin Ehlis300888c2016-05-18 13:43:26 -0600341 ImageDescriptor(const VkDescriptorType);
342 void WriteUpdate(const VkWriteDescriptorSet *, const uint32_t) override;
343 void CopyUpdate(const Descriptor *) override;
Tobin Ehlis8020eea2016-08-17 11:10:41 -0600344 void BindCommandBuffer(const core_validation::layer_data *, GLOBAL_CB_NODE *) override;
Norbert Nopper419a1092016-05-15 19:19:41 +0200345 virtual bool IsStorage() const override { return storage_; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600346 VkImageView GetImageView() const { return image_view_; }
347 VkImageLayout GetImageLayout() const { return image_layout_; }
348
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700349 private:
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600350 bool storage_;
351 VkImageView image_view_;
352 VkImageLayout image_layout_;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600353};
354
355class TexelDescriptor : public Descriptor {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700356 public:
Tobin Ehlis300888c2016-05-18 13:43:26 -0600357 TexelDescriptor(const VkDescriptorType);
358 void WriteUpdate(const VkWriteDescriptorSet *, const uint32_t) override;
359 void CopyUpdate(const Descriptor *) override;
Tobin Ehlis8020eea2016-08-17 11:10:41 -0600360 void BindCommandBuffer(const core_validation::layer_data *, GLOBAL_CB_NODE *) override;
Tobin Ehlisf490f2e2016-05-17 06:43:48 -0600361 virtual bool IsStorage() const override { return storage_; }
362 VkBufferView GetBufferView() const { return buffer_view_; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600363
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700364 private:
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600365 VkBufferView buffer_view_;
366 bool storage_;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600367};
368
369class BufferDescriptor : public Descriptor {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700370 public:
Tobin Ehlis300888c2016-05-18 13:43:26 -0600371 BufferDescriptor(const VkDescriptorType);
372 void WriteUpdate(const VkWriteDescriptorSet *, const uint32_t) override;
373 void CopyUpdate(const Descriptor *) override;
Tobin Ehlis8020eea2016-08-17 11:10:41 -0600374 void BindCommandBuffer(const core_validation::layer_data *, GLOBAL_CB_NODE *) override;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600375 virtual bool IsDynamic() const override { return dynamic_; }
376 virtual bool IsStorage() const override { return storage_; }
377 VkBuffer GetBuffer() const { return buffer_; }
378 VkDeviceSize GetOffset() const { return offset_; }
379 VkDeviceSize GetRange() const { return range_; }
380
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700381 private:
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600382 bool storage_;
383 bool dynamic_;
384 VkBuffer buffer_;
385 VkDeviceSize offset_;
386 VkDeviceSize range_;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600387};
Tobin Ehlis68d0adf2016-06-01 11:33:50 -0600388// Structs to contain common elements that need to be shared between Validate* and Perform* calls below
389struct AllocateDescriptorSetsData {
390 uint32_t required_descriptors_by_type[VK_DESCRIPTOR_TYPE_RANGE_SIZE];
Tobin Ehlisa8e46e72017-06-21 10:16:10 -0600391 std::vector<std::shared_ptr<DescriptorSetLayout const>> layout_nodes;
Tobin Ehlis68d0adf2016-06-01 11:33:50 -0600392 AllocateDescriptorSetsData(uint32_t);
393};
Tobin Ehlisee471462016-05-26 11:21:59 -0600394// Helper functions for descriptor set functions that cross multiple sets
395// "Validate" will make sure an update is ok without actually performing it
Tobin Ehlis6a72dc72016-06-01 16:41:17 -0600396bool ValidateUpdateDescriptorSets(const debug_report_data *, const core_validation::layer_data *, uint32_t,
Tobin Ehlis56a30942016-05-19 08:00:00 -0600397 const VkWriteDescriptorSet *, uint32_t, const VkCopyDescriptorSet *);
Tobin Ehlisee471462016-05-26 11:21:59 -0600398// "Perform" does the update with the assumption that ValidateUpdateDescriptorSets() has passed for the given update
Tobin Ehlis6a72dc72016-06-01 16:41:17 -0600399void PerformUpdateDescriptorSets(const core_validation::layer_data *, uint32_t, const VkWriteDescriptorSet *, uint32_t,
400 const VkCopyDescriptorSet *);
Mark Lobodzinski3d63a042017-03-09 16:24:13 -0700401// Similar to PerformUpdateDescriptorSets, this function will do the same for updating via templates
402void PerformUpdateDescriptorSetsWithTemplateKHR(layer_data *, VkDescriptorSet, std::unique_ptr<TEMPLATE_STATE> const &,
403 const void *);
Tobin Ehlisf320b192017-03-14 11:22:50 -0600404// Update the common AllocateDescriptorSetsData struct which can then be shared between Validate* and Perform* funcs below
405void UpdateAllocateDescriptorSetsData(const layer_data *dev_data, const VkDescriptorSetAllocateInfo *,
406 AllocateDescriptorSetsData *);
Tobin Ehlisee471462016-05-26 11:21:59 -0600407// Validate that Allocation state is ok
Tobin Ehlisf320b192017-03-14 11:22:50 -0600408bool ValidateAllocateDescriptorSets(const core_validation::layer_data *, const VkDescriptorSetAllocateInfo *,
409 const AllocateDescriptorSetsData *);
Tobin Ehlisee471462016-05-26 11:21:59 -0600410// Update state based on allocating new descriptorsets
Tobin Ehlis997b2582016-06-02 08:43:37 -0600411void PerformAllocateDescriptorSets(const VkDescriptorSetAllocateInfo *, const VkDescriptorSet *, const AllocateDescriptorSetsData *,
Tobin Ehlisbd711bd2016-10-12 14:27:30 -0600412 std::unordered_map<VkDescriptorPool, DESCRIPTOR_POOL_STATE *> *,
Tobin Ehlis997b2582016-06-02 08:43:37 -0600413 std::unordered_map<VkDescriptorSet, cvdescriptorset::DescriptorSet *> *,
John Zulauf48a6a702017-12-22 17:14:54 -0700414 core_validation::layer_data *);
Tobin Ehlisee471462016-05-26 11:21:59 -0600415
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600416/*
417 * DescriptorSet class
418 *
419 * Overview - This class encapsulates the Vulkan VkDescriptorSet data (set).
420 * A set has an underlying layout which defines the bindings in the set and the
421 * types and numbers of descriptors in each descriptor slot. Most of the layout
422 * interfaces are exposed through identically-named functions in the set class.
423 * Please refer to the DescriptorSetLayout comment above for a description of
424 * index, binding, and global index.
425 *
426 * At construction a vector of Descriptor* is created with types corresponding to the
427 * layout. The primary operation performed on the descriptors is to update them
428 * via write or copy updates, and validate that the update contents are correct.
429 * In order to validate update contents, the DescriptorSet stores a bunch of ptrs
430 * to data maps where various Vulkan objects can be looked up. The management of
431 * those maps is performed externally. The set class relies on their contents to
432 * be correct at the time of update.
433 */
Tobin Ehlis05be5df2016-05-05 08:25:02 -0600434class DescriptorSet : public BASE_NODE {
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700435 public:
Tobin Ehlis452b4532017-06-21 09:56:13 -0600436 DescriptorSet(const VkDescriptorSet, const VkDescriptorPool, const std::shared_ptr<DescriptorSetLayout const> &,
John Zulauf48a6a702017-12-22 17:14:54 -0700437 core_validation::layer_data *);
Tobin Ehlis9906d9d2016-05-17 14:23:46 -0600438 ~DescriptorSet();
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600439 // A number of common Get* functions that return data based on layout from which this set was created
Tobin Ehlis7cd8c792017-06-20 08:30:39 -0600440 uint32_t GetTotalDescriptorCount() const { return p_layout_->GetTotalDescriptorCount(); };
441 uint32_t GetDynamicDescriptorCount() const { return p_layout_->GetDynamicDescriptorCount(); };
442 uint32_t GetBindingCount() const { return p_layout_->GetBindingCount(); };
443 VkDescriptorType GetTypeFromIndex(const uint32_t index) const { return p_layout_->GetTypeFromIndex(index); };
444 VkDescriptorType GetTypeFromGlobalIndex(const uint32_t index) const { return p_layout_->GetTypeFromGlobalIndex(index); };
445 VkDescriptorType GetTypeFromBinding(const uint32_t binding) const { return p_layout_->GetTypeFromBinding(binding); };
446 uint32_t GetDescriptorCountFromIndex(const uint32_t index) const { return p_layout_->GetDescriptorCountFromIndex(index); };
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600447 uint32_t GetDescriptorCountFromBinding(const uint32_t binding) const {
Tobin Ehlis7cd8c792017-06-20 08:30:39 -0600448 return p_layout_->GetDescriptorCountFromBinding(binding);
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600449 };
Tobin Ehlisa3525e02016-11-17 10:50:52 -0700450 // Return index into dynamic offset array for given binding
451 int32_t GetDynamicOffsetIndexFromBinding(uint32_t binding) const {
Tobin Ehlis7cd8c792017-06-20 08:30:39 -0600452 return p_layout_->GetDynamicOffsetIndexFromBinding(binding);
Tobin Ehlisa3525e02016-11-17 10:50:52 -0700453 }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600454 // Return true if given binding is present in this set
Tobin Ehlis7cd8c792017-06-20 08:30:39 -0600455 bool HasBinding(const uint32_t binding) const { return p_layout_->HasBinding(binding); };
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600456 // Is this set compatible with the given layout?
Tobin Ehlis6dc57dd2017-06-21 10:08:52 -0600457 bool IsCompatible(DescriptorSetLayout const *const, std::string *) const;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600458 // For given bindings validate state at time of draw is correct, returning false on error and writing error details into string*
John Zulauf48a6a702017-12-22 17:14:54 -0700459 bool ValidateDrawState(const std::map<uint32_t, descriptor_req> &, const std::vector<uint32_t> &, GLOBAL_CB_NODE *,
Tobin Ehlisc8266452017-04-07 12:20:30 -0600460 const char *caller, std::string *) const;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600461 // For given set of bindings, add any buffers and images that will be updated to their respective unordered_sets & return number
462 // of objects inserted
Tobin Ehliscebc4c02016-08-22 10:10:43 -0600463 uint32_t GetStorageUpdates(const std::map<uint32_t, descriptor_req> &, std::unordered_set<VkBuffer> *,
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600464 std::unordered_set<VkImageView> *) const;
Tobin Ehlis300888c2016-05-18 13:43:26 -0600465
466 // Descriptor Update functions. These functions validate state and perform update separately
467 // Validate contents of a WriteUpdate
Tobin Ehlis75f04ec2016-10-06 17:43:11 -0600468 bool ValidateWriteUpdate(const debug_report_data *, const VkWriteDescriptorSet *, UNIQUE_VALIDATION_ERROR_CODE *,
469 std::string *);
Tobin Ehlis300888c2016-05-18 13:43:26 -0600470 // Perform a WriteUpdate whose contents were just validated using ValidateWriteUpdate
471 void PerformWriteUpdate(const VkWriteDescriptorSet *);
472 // Validate contents of a CopyUpdate
Tobin Ehlis75f04ec2016-10-06 17:43:11 -0600473 bool ValidateCopyUpdate(const debug_report_data *, const VkCopyDescriptorSet *, const DescriptorSet *,
474 UNIQUE_VALIDATION_ERROR_CODE *, std::string *);
Tobin Ehlis300888c2016-05-18 13:43:26 -0600475 // Perform a CopyUpdate whose contents were just validated using ValidateCopyUpdate
476 void PerformCopyUpdate(const VkCopyDescriptorSet *, const DescriptorSet *);
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600477
John Zulauf1f8174b2018-02-16 12:58:37 -0700478 const std::shared_ptr<DescriptorSetLayout const> GetLayout() const { return p_layout_; };
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600479 VkDescriptorSet GetSet() const { return set_; };
480 // Return unordered_set of all command buffers that this set is bound to
Tobin Ehlis2556f5b2016-06-24 17:22:16 -0600481 std::unordered_set<GLOBAL_CB_NODE *> GetBoundCmdBuffers() const { return cb_bindings; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600482 // Bind given cmd_buffer to this descriptor set
Tobin Ehlis022528b2016-12-29 12:22:32 -0700483 void BindCommandBuffer(GLOBAL_CB_NODE *, const std::map<uint32_t, descriptor_req> &);
John Zulauf48a6a702017-12-22 17:14:54 -0700484
485 // Track work that has been bound or validated to avoid duplicate work, important when large descriptor arrays
486 // are present
487 typedef std::unordered_set<uint32_t> TrackedBindings;
488 static void FilterAndTrackOneBindingReq(const BindingReqMap::value_type &binding_req_pair, const BindingReqMap &in_req,
489 BindingReqMap *out_req, TrackedBindings *set);
490 static void FilterAndTrackOneBindingReq(const BindingReqMap::value_type &binding_req_pair, const BindingReqMap &in_req,
491 BindingReqMap *out_req, TrackedBindings *set, uint32_t limit);
492 void FilterAndTrackBindingReqs(GLOBAL_CB_NODE *, const BindingReqMap &in_req, BindingReqMap *out_req);
493 void FilterAndTrackBindingReqs(GLOBAL_CB_NODE *, PIPELINE_STATE *, const BindingReqMap &in_req, BindingReqMap *out_req);
494 void ClearCachedDynamicDescriptorValidation(GLOBAL_CB_NODE *cb_state) { cached_validation_[cb_state].dynamic_buffers.clear(); }
495 void ClearCachedValidation(GLOBAL_CB_NODE *cb_state) { cached_validation_.erase(cb_state); }
Tobin Ehlis2556f5b2016-06-24 17:22:16 -0600496 // If given cmd_buffer is in the cb_bindings set, remove it
John Zulauf48a6a702017-12-22 17:14:54 -0700497 void RemoveBoundCommandBuffer(GLOBAL_CB_NODE *cb_node) {
498 cb_bindings.erase(cb_node);
499 ClearCachedValidation(cb_node);
500 }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600501 VkSampler const *GetImmutableSamplerPtrFromBinding(const uint32_t index) const {
Tobin Ehlis7cd8c792017-06-20 08:30:39 -0600502 return p_layout_->GetImmutableSamplerPtrFromBinding(index);
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600503 };
504 // For a particular binding, get the global index
John Zulaufc483f442017-12-15 14:02:06 -0700505 const IndexRange &GetGlobalIndexRangeFromBinding(const uint32_t binding) const {
506 return p_layout_->GetGlobalIndexRangeFromBinding(binding);
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600507 };
508 // Return true if any part of set has ever been updated
509 bool IsUpdated() const { return some_update_; };
Józef Kuciaf0c94d42017-10-25 22:15:22 +0200510 bool IsPushDescriptor() const { return p_layout_->IsPushDescriptor(); };
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600511
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700512 private:
Tobin Ehlis75f04ec2016-10-06 17:43:11 -0600513 bool VerifyWriteUpdateContents(const VkWriteDescriptorSet *, const uint32_t, UNIQUE_VALIDATION_ERROR_CODE *,
514 std::string *) const;
Tobin Ehliscbcf2342016-05-24 13:07:12 -0600515 bool VerifyCopyUpdateContents(const VkCopyDescriptorSet *, const DescriptorSet *, VkDescriptorType, uint32_t,
Tobin Ehlis75f04ec2016-10-06 17:43:11 -0600516 UNIQUE_VALIDATION_ERROR_CODE *, std::string *) const;
Tobin Ehlis4668dce2016-11-16 09:30:23 -0700517 bool ValidateBufferUsage(BUFFER_STATE const *, VkDescriptorType, UNIQUE_VALIDATION_ERROR_CODE *, std::string *) const;
Tobin Ehlis75f04ec2016-10-06 17:43:11 -0600518 bool ValidateBufferUpdate(VkDescriptorBufferInfo const *, VkDescriptorType, UNIQUE_VALIDATION_ERROR_CODE *,
519 std::string *) const;
Tobin Ehlis9906d9d2016-05-17 14:23:46 -0600520 // Private helper to set all bound cmd buffers to INVALID state
521 void InvalidateBoundCmdBuffers();
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700522 bool some_update_; // has any part of the set ever been updated?
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600523 VkDescriptorSet set_;
Tobin Ehlis7ca20be2016-10-12 15:09:16 -0600524 DESCRIPTOR_POOL_STATE *pool_state_;
Tobin Ehlis452b4532017-06-21 09:56:13 -0600525 const std::shared_ptr<DescriptorSetLayout const> p_layout_;
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600526 std::vector<std::unique_ptr<Descriptor>> descriptors_;
Tobin Ehlis3d15c4a2016-06-02 13:04:47 -0600527 // Ptr to device data used for various data look-ups
John Zulauf48a6a702017-12-22 17:14:54 -0700528 core_validation::layer_data *const device_data_;
Tobin Ehlisc3b6c4c2017-02-02 17:26:40 -0700529 const VkPhysicalDeviceLimits limits_;
John Zulauf48a6a702017-12-22 17:14:54 -0700530
531 // Cached binding and validation support:
532 //
533 // For the lifespan of a given command buffer recording, do lazy evaluation, caching, and dirtying of
534 // expensive validation operation (typically per-draw)
535 typedef std::unordered_map<GLOBAL_CB_NODE *, TrackedBindings> TrackedBindingMap;
536 typedef std::unordered_map<PIPELINE_STATE *, TrackedBindingMap> ValidatedBindings;
537 // Track the validation caching of bindings vs. the command buffer and draw state
538 typedef std::unordered_map<uint32_t, GLOBAL_CB_NODE::ImageLayoutUpdateCount> VersionedBindings;
539 struct CachedValidation {
540 TrackedBindings command_binding_and_usage; // Persistent for the life of the recording
541 TrackedBindings non_dynamic_buffers; // Persistent for the life of the recording
542 TrackedBindings dynamic_buffers; // Dirtied (flushed) each BindDescriptorSet
543 std::unordered_map<PIPELINE_STATE *, VersionedBindings> image_samplers; // Tested vs. changes to CB's ImageLayout
544 };
545 typedef std::unordered_map<GLOBAL_CB_NODE *, CachedValidation> CachedValidationMap;
546 // Image and ImageView bindings are validated per pipeline and not invalidate by repeated binding
547 CachedValidationMap cached_validation_;
548};
549// For the "bindless" style resource usage with many descriptors, need to optimize binding and validation
550class PrefilterBindRequestMap {
551 public:
552 static const uint32_t kManyDescriptors_ = 64; // TODO base this number on measured data
553 std::unique_ptr<BindingReqMap> filtered_map_;
554 const BindingReqMap &orig_map_;
555
556 PrefilterBindRequestMap(DescriptorSet &ds, const BindingReqMap &in_map, GLOBAL_CB_NODE *cb_state);
557 PrefilterBindRequestMap(DescriptorSet &ds, const BindingReqMap &in_map, GLOBAL_CB_NODE *cb_state, PIPELINE_STATE *);
558 const BindingReqMap &Map() const { return (filtered_map_) ? *filtered_map_ : orig_map_; }
Tobin Ehlis0a43bde2016-05-03 08:31:08 -0600559};
Dave Houltona9df0ce2018-02-07 10:51:23 -0700560} // namespace cvdescriptorset
Mark Lobodzinski64318ba2017-01-26 13:34:13 -0700561#endif // CORE_VALIDATION_DESCRIPTOR_SETS_H_