41 #ifndef RV_VKDescriptorSet_h
42 #define RV_VKDescriptorSet_h
102 uint32_t array_stride,
103 uint32_t matrix_stride,
112 , baseSize(base_size)
113 , arrayStride(array_stride)
114 , matrixStride(matrix_stride)
116 , myIsActive(is_active)
125 uint32_t arraySize = 1;
129 uint32_t binding = 0;
136 uint32_t baseSize = 0;
138 uint32_t arrayStride = 0;
140 uint32_t matrixStride = 0;
144 bool myIsActive =
true;
156 bool isValid()
const;
176 uint32_t buffer_size,
179 bool isCompatibleToMerge();
180 bool isCompatibleToBind();
184 bool compare_uniforms_types,
185 bool compare_uniforms_names,
186 bool compare_binding_location,
187 bool compare_binding_stages)
const;
193 uint32_t myCount = 0;
225 bool isValid()
const;
237 bool allow_missing_bindings,
238 bool allow_different_stages,
247 return b_num < myBindings.size() &&
248 myBindings(b_num).isValid();
273 bool myHashValid =
false;
287 return myVkDescriptorSetLayout;
295 : myInst(other.myInst)
296 , myVkDescriptorSetLayout(other.myVkDescriptorSetLayout)
298 other.myVkDescriptorSetLayout =
nullptr;
313 VkDescriptorSetLayout vk_layout,
315 : myInst(inst), myVkDescriptorSetLayout(vk_layout)
332 bool hasBinding(uint32_t binding, uint32_t element = 0);
356 VkBufferView buffer_view,
360 uint32_t dst_binding,
361 uint32_t dst_element,
362 uint32_t src_binding,
363 uint32_t src_element,
366 bool isDirty()
const;
404 const char*
name =
nullptr);
408 VkDescriptorSet vk_set,
430 VkDescriptorSet myVkDescriptorSet;
453 VkDescriptorPool vk_desc_pool)
454 : myInst(inst), mySizes(sizes), myVkDescPool(vk_desc_pool)
460 VkResult allocateSet(VkDescriptorSetLayout layout, VkDescriptorSet& set);
461 VkResult freeSet(VkDescriptorSet set);
493 VkDescriptorSet allocateVkDescriptorSet(VkDescriptorSetLayout vk_layout);
494 void freeVkDescriptorSet(VkDescriptorSet vk_set);
504 void allocateNewPool();
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
const RV_VKDescriptorSetInfo * getInfo() const
VkShaderStageFlags myStages
std::size_t SYS_HashType
Define the type for hash values.
void RVgetUniformSize(RV_UniformType type, int &out_typesize, bool &out_is_int, int &out_size, int &out_align, int &out_vec_num, int &out_col_num)
VkDescriptorSet getVkDescriptorSet()
UT_UniquePtr< RV_VKDescriptorPool > RV_VKDescriptorPoolPtr
UT_Array< RV_Uniform > myUniforms
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
CompareResults OIIO_API compare(const ImageBuf &A, const ImageBuf &B, float failthresh, float warnthresh, ROI roi={}, int nthreads=0)
exint getLayoutID() const
GLuint const GLchar * name
Handle to the main interface of Vulkan.
const UT_Array< RV_VKDescriptorBinding > & getBindings() const
RV_VKDescriptorLayout(RV_Instance *inst, VkDescriptorSetLayout vk_layout, const PassKey &)
VkFlags VkDescriptorSetLayoutCreateFlags
LeafData & operator=(const LeafData &)=delete
bool hasBinding(uint32_t b_num) const
RV_VKDescriptorLayout(RV_VKDescriptorLayout &&other)
Reader/Writer mutex class.
size_t hash_value(const CH_ChannelRef &ref)
FMT_INLINE void print(format_string< T...> fmt, T &&...args)
VkDescriptorSetLayout getVkDescriptorSetLayout() const
RV_VKDescriptorPool(RV_Instance *inst, const UT_Array< VkDescriptorPoolSize > &sizes, VkDescriptorPool vk_desc_pool)
VkFlags VkShaderStageFlags