safestruct: Remove safe_VkDescriptorDataEXT

This commit is contained in:
spencer-lunarg 2024-04-10 18:41:54 +09:00 committed by Spencer Fricke
parent 1defcd3208
commit 1135918c96
4 changed files with 9 additions and 519 deletions

View file

@ -77,9 +77,6 @@ class SafeStructOutputGenerator(BaseGenerator):
# vku::safe::AccelerationStructureGeometryKHR needs to know if we're doing a host or device build
'VkAccelerationStructureGeometryKHR' :
', const bool is_host, const VkAccelerationStructureBuildRangeInfoKHR *build_range_info',
# vku::safe::DescriptorDataEXT needs to know what field of union is intialized
'VkDescriptorDataEXT' :
', const VkDescriptorType type',
}
# Determine if a structure needs a safe_struct helper function
@ -87,6 +84,8 @@ class SafeStructOutputGenerator(BaseGenerator):
def needSafeStruct(self, struct: Struct) -> bool:
if struct.name in self.no_autogen:
return False
if struct.name in self.union_of_pointers:
return False
if 'VkBase' in struct.name:
return False # Ingore structs like VkBaseOutStructure
if struct.sType is not None:
@ -189,9 +188,6 @@ class SafeStructOutputGenerator(BaseGenerator):
else:
out.append(f'{member.cDeclaration}{initialize};\n')
if (struct.name == 'VkDescriptorDataEXT'):
out.append('char type_at_end[sizeof(VkDescriptorDataEXT)+sizeof(VkDescriptorGetInfoEXT::type)];')
constructParam = self.custom_construct_params.get(struct.name, '')
out.append(f'''
{safe_name}(const {struct.name}* in_struct{constructParam}, PNextCopyState* copy_state = {{}}{copy_pnext});