Lines Matching full:binding

56  *   A layout consists of some number of bindings, each of which has a binding#, a
65 * Index vs Binding - A layout is created with an array of VkDescriptorSetLayoutBinding
66 * where each array index will have a corresponding binding# that is defined in that struct.
67 * The binding#, then, is decoupled from VkDescriptorSetLayoutBinding index, which allows
70 * from a single binding to the next consecutive binding.
73 * binding#. For example, if the binding creation order is 8, 7, 10, 3, 4, then the
74 * internal binding array will have five entries stored in binding order 3, 4, 7, 8, 10.
76 * and use the Get*FromIndex() functions for each index. To just process a single binding,
79 * Global Index - The binding vector index has as many indices as there are bindings.
83 * descriptor 0 of of the lowest binding# is index 0 and each descriptor in the layout
84 * increments from there. So if the lowest binding# in this example had descriptorCount of
85 * 10, then the GlobalStartIndex of the 2nd lowest binding# will be 10 where 0-9 are the
86 * global indices for the lowest binding#.
97 …// For a given binding, return the number of descriptors in that binding and all successive bindin…
99 // Non-empty binding numbers in order
101 // Return true if given binding is present in this layout
102 …bool HasBinding(const uint32_t binding) const { return binding_to_index_map_.count(binding) > 0; }; in HasBinding() argument
103 …// Return true if binding 1 beyond given exists and has same type, stageFlags & immutable sampler …
105 uint32_t GetIndexFromBinding(uint32_t binding) const;
106 // Various Get functions that can either be passed a binding#, which will
108 uint32_t GetMaxBinding() const { return bindings_[bindings_.size() - 1].binding; } in GetMaxBinding()
110 …riptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromBinding(uint32_t binding) const { in GetDescriptorSetLayoutBindingPtrFromBinding() argument
111 return GetDescriptorSetLayoutBindingPtrFromIndex(GetIndexFromBinding(binding)); in GetDescriptorSetLayoutBindingPtrFromBinding()
116 uint32_t GetDescriptorCountFromBinding(const uint32_t binding) const { in GetDescriptorCountFromBinding() argument
117 return GetDescriptorCountFromIndex(GetIndexFromBinding(binding)); in GetDescriptorCountFromBinding()
120 …torType GetTypeFromBinding(const uint32_t binding) const { return GetTypeFromIndex(GetIndexFromBin… in GetTypeFromBinding() argument
122 VkShaderStageFlags GetStageFlagsFromBinding(const uint32_t binding) const { in GetStageFlagsFromBinding() argument
123 return GetStageFlagsFromIndex(GetIndexFromBinding(binding)); in GetStageFlagsFromBinding()
126 VkDescriptorBindingFlagsEXT GetDescriptorBindingFlagsFromBinding(const uint32_t binding) const { in GetDescriptorBindingFlagsFromBinding() argument
127 return GetDescriptorBindingFlagsFromIndex(GetIndexFromBinding(binding)); in GetDescriptorBindingFlagsFromBinding()
131 …// For a given binding and array index, return the corresponding index into the dynamic offset arr…
132 int32_t GetDynamicOffsetIndexFromBinding(uint32_t binding) const { in GetDynamicOffsetIndexFromBinding() argument
133 auto dyn_off = binding_to_dynamic_array_idx_map_.find(binding); in GetDynamicOffsetIndexFromBinding()
135 assert(0); // Requesting dyn offset for invalid binding/array idx pair in GetDynamicOffsetIndexFromBinding()
140 // For a particular binding, get the global index range
141 … This call should be guarded by a call to "HasBinding(binding)" to verify that the given binding
145 // Helper function to get the next valid binding for a descriptor
166 // The following map allows an non-iterative lookup of a binding from a global index...
168 // For a given binding map to associated index in the dynamic offset array
191 bool HasBinding(const uint32_t binding) const { return layout_id_->HasBinding(binding); } in HasBinding() argument
207 …uint32_t GetIndexFromBinding(uint32_t binding) const { return layout_id_->GetIndexFromBinding(bind… in GetIndexFromBinding() argument
208 // Various Get functions that can either be passed a binding#, which will
214 …riptorSetLayoutBinding const *GetDescriptorSetLayoutBindingPtrFromBinding(uint32_t binding) const { in GetDescriptorSetLayoutBindingPtrFromBinding() argument
215 return layout_id_->GetDescriptorSetLayoutBindingPtrFromBinding(binding); in GetDescriptorSetLayoutBindingPtrFromBinding()
220 uint32_t GetDescriptorCountFromBinding(const uint32_t binding) const { in GetDescriptorCountFromBinding() argument
221 return layout_id_->GetDescriptorCountFromBinding(binding); in GetDescriptorCountFromBinding()
224 …riptorType GetTypeFromBinding(const uint32_t binding) const { return layout_id_->GetTypeFromBindin… in GetTypeFromBinding() argument
226 VkShaderStageFlags GetStageFlagsFromBinding(const uint32_t binding) const { in GetStageFlagsFromBinding() argument
227 return layout_id_->GetStageFlagsFromBinding(binding); in GetStageFlagsFromBinding()
232 VkDescriptorBindingFlagsEXT GetDescriptorBindingFlagsFromBinding(const uint32_t binding) const { in GetDescriptorBindingFlagsFromBinding() argument
233 return layout_id_->GetDescriptorBindingFlagsFromBinding(binding); in GetDescriptorBindingFlagsFromBinding()
235 VkSampler const *GetImmutableSamplerPtrFromBinding(const uint32_t binding) const { in GetImmutableSamplerPtrFromBinding() argument
236 return layout_id_->GetImmutableSamplerPtrFromBinding(binding); in GetImmutableSamplerPtrFromBinding()
241 …// For a given binding and array index, return the corresponding index into the dynamic offset arr…
242 int32_t GetDynamicOffsetIndexFromBinding(uint32_t binding) const { in GetDynamicOffsetIndexFromBinding() argument
243 return layout_id_->GetDynamicOffsetIndexFromBinding(binding); in GetDynamicOffsetIndexFromBinding()
245 // For a particular binding, get the global index range
246 … This call should be guarded by a call to "HasBinding(binding)" to verify that the given binding
247 const IndexRange &GetGlobalIndexRangeFromBinding(const uint32_t binding) const { in GetGlobalIndexRangeFromBinding() argument
248 return layout_id_->GetGlobalIndexRangeFromBinding(binding); in GetGlobalIndexRangeFromBinding()
252 // Helper function to get the next valid binding for a descriptor
253 …uint32_t GetNextValidBinding(const uint32_t binding) const { return layout_id_->GetNextValidBindin… in GetNextValidBinding() argument
258 bool IsVariableDescriptorCount(uint32_t binding) const { in IsVariableDescriptorCount() argument
259 return IsVariableDescriptorCountFromIndex(GetIndexFromBinding(binding)); in IsVariableDescriptorCount()
265 // Binding Iterator
273 …ConstBindingIterator(const DescriptorSetLayout *layout, uint32_t binding) : ConstBindingIterator(l… in ConstBindingIterator() argument
274 index_ = layout->GetIndexFromBinding(binding); in ConstBindingIterator()
294 // Return index into dynamic offset array for given binding
296 …return layout_->GetDynamicOffsetIndexFromBinding(Binding()); // There is only binding mapped acc… in GetDynamicOffsetIndex()
326 uint32_t Binding() const { return layout_->GetBindings()[index_].binding; } in Binding() function
360 // Create binding between resources of this descriptor and given cb_node
505 // For a particular binding starting at offset and having update_count descriptors
506 // updated, verify that for any binding boundaries crossed, the update is consistent
530 * index, binding, and global index.
551 …criptorType GetTypeFromBinding(const uint32_t binding) const { return p_layout_->GetTypeFromBindin… in GetTypeFromBinding() argument
553 uint32_t GetDescriptorCountFromBinding(const uint32_t binding) const { in GetDescriptorCountFromBinding() argument
554 return p_layout_->GetDescriptorCountFromBinding(binding); in GetDescriptorCountFromBinding()
556 // Return index into dynamic offset array for given binding
557 int32_t GetDynamicOffsetIndexFromBinding(uint32_t binding) const { in GetDynamicOffsetIndexFromBinding() argument
558 return p_layout_->GetDynamicOffsetIndexFromBinding(binding); in GetDynamicOffsetIndexFromBinding()
560 // Return true if given binding is present in this set
561 bool HasBinding(const uint32_t binding) const { return p_layout_->HasBinding(binding); }; in HasBinding() argument
602 // For a particular binding, get the global index
603 …const IndexRange GetGlobalIndexRangeFromBinding(const uint32_t binding, bool actual_length = false…
604 …if (actual_length && binding == p_layout_->GetMaxBinding() && IsVariableDescriptorCount(binding)) {
605 IndexRange range = p_layout_->GetGlobalIndexRangeFromBinding(binding);
606 auto diff = GetDescriptorCountFromBinding(binding) - GetVariableDescriptorCount();
610 return p_layout_->GetGlobalIndexRangeFromBinding(binding);
615 …bool IsVariableDescriptorCount(uint32_t binding) const { return p_layout_->IsVariableDescriptorCou… in IsVariableDescriptorCount() argument
616 bool IsUpdateAfterBind(uint32_t binding) const { in IsUpdateAfterBind() argument
617 …return !!(p_layout_->GetDescriptorBindingFlagsFromBinding(binding) & VK_DESCRIPTOR_BINDING_UPDATE_… in IsUpdateAfterBind()
636 // Cached binding and validation support:
650 … // Image and ImageView bindings are validated per pipeline and not invalidate by repeated binding
653 // For the "bindless" style resource usage with many descriptors, need to optimize binding and vali…