Home | History | Annotate | Download | only in vulkan-validation-layers

Lines Matching refs:indent

1069     def _dereference_conditionally(self, indent, prefix, type_name, name):
1072 s_code += '%sif ((%sdescriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) ||\n' % (indent, prefix)
1073 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) ||\n' % (indent, prefix)
1074 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) ||\n' % (indent, prefix)
1075 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) ) {\n' % (indent, prefix)
1077 s_code += '%sif ((%sdescriptorType == VK_DESCRIPTOR_TYPE_SAMPLER) ||\n' % (indent, prefix)
1078 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) ||\n' % (indent, prefix)
1079 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) ||\n' % (indent, prefix)
1080 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) ||\n' % (indent, prefix)
1081 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) ) {\n' % (indent, prefix)
1083 s_code += '%sif ((%sdescriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) ||\n' % (indent, prefix)
1084 s_code += '%s (%sdescriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) ) {\n' % (indent, prefix)
1086 s_code += '%sOBJTRACK_NODE* pNode = VkCommandBufferMap[(uint64_t)commandBuffer];\n' % (indent)
1087 s_code += '%sif ((%s) && (pNode->status & OBJSTATUS_COMMAND_BUFFER_SECONDARY)) {\n' % (indent, name)
1089 s_code += '%sif (%s) {\n' % (indent, name)
1092 def _gen_obj_validate_code(self, struct_uses, obj_type_mapping, func_name, valid_null_dict, param0_name, indent, prefix, array_index):
1108 tmp_pre = self._dereference_conditionally(indent, prefix, type_name, name)
1110 indent += ' '
1115 pre_code += '%sfor (uint32_t %s=0; %s<%s%s; ++%s) {\n' % (indent, idx, idx, prefix, array, idx)
1116 indent += ' '
1122 tmp_pre = self._gen_obj_validate_code(struct_uses[obj], obj_type_mapping, func_name, valid_null_dict, param0_name, indent, local_prefix, array_index)
1125 indent = indent[4:]
1126 pre_code += '%s}\n' % (indent)
1128 indent = indent[4:]
1129 pre_code += '%s}\n' % (indent)
1141 tmp_pre = self._dereference_conditionally(indent, prefix, type_name, full_name)
1143 indent += ' '
1147 pre_code += '%sfor (uint32_t %s=0; %s<%s%s; ++%s) {\n' % (indent, idx, idx, prefix, array, idx)
1148 indent += ' '
1151 pre_code += '%sskipCall |= validate_%s(%s, %s, %s, %s);\n' %(indent, fname, param0_name, full_name, dbg_obj_type, null_obj_ok)
1153 indent = indent[4:]
1154 pre_code += '%s}\n' % (indent)
1155 indent = indent[4:]
1156 pre_code += '%s}\n' % (indent)
1159 pre_code += '%sskipCall |= validate_%s(%s, %s, %s, %s);\n' %(indent, fname, param0_name, full_name, dbg_obj_type, null_obj_ok)
1313 indent = ' '
1315 using_line += '%sVkBool32 skipCall = VK_FALSE;\n' % (indent)
1317 using_line += '%sloader_platform_thread_lock_mutex(&objLock);\n' % (indent)
1322 using_line += '%sloader_platform_thread_unlock_mutex(&objLock);\n' % (indent)
1425 def _gen_obj_code(self, struct_uses, param_type, indent, prefix, array_index, vector_name_set, first_level_param):
1443 pre_code += '%sif (%s) {\n' % (indent, name)
1445 pre_code += '%sif (local_%s) {\n' % (indent, name)
1446 indent += ' '
1451 pre_code += '%slocal_%s = new safe_%s[%s];\n' % (indent, name, param_type[name].strip('*'), array)
1454 pre_code += '%sfor (uint32_t %s=0; %s<%s%s; ++%s) {\n' % (indent, idx, idx, prefix, array, idx)
1455 indent += ' '
1457 pre_code += '%slocal_%s[%s].initialize(&%s[%s]);\n' % (indent, name, idx, name, idx)
1461 pre_code += '%slocal_%s = new safe_%s(%s);\n' % (indent, name, param_type[name].strip('*'), name)
1468 (tmp_decl, tmp_pre, tmp_post) = self._gen_obj_code(struct_uses[obj], param_type, indent, local_prefix, array_index, vector_name_set, False)
1473 indent = indent[4:]
1474 pre_code += '%s}\n' % (indent)
1476 indent = indent[4:]
1477 pre_code += '%s}\n' % (indent)
1481 pre_code += '%s%s* local_%s = NULL;\n' % (indent, struct_uses[obj], name)
1483 pre_code += '%sif (local_%s%s) {\n' %(indent, prefix, name)
1485 pre_code += '%sif (%s%s) {\n' %(indent, prefix, name)
1486 indent += ' '
1491 pre_code += '%slocal_%s = new %s[%s];\n' % (indent, name, struct_uses[obj], array)
1494 pre_code += '%sfor (uint32_t %s=0; %s<%s%s; ++%s) {\n' % (indent, idx, idx, prefix, array, idx)
1495 indent += ' '
1500 pre_code += '%slocal_%s%s = (%s)((VkUniqueObject*)%s%s)->actualObject;\n' % (indent, prefix, name, struct_uses[obj], prefix, name)
1502 indent = indent[4:]
1503 pre_code += '%s}\n' % (indent)
1504 indent = indent[4:]
1505 pre_code += '%s}\n' % (indent)
1508 pre_code += '%sif (%s%s) {\n' %(indent, prefix, name)
1509 indent += ' '
1514 pre_code += '%slocal_%s%s = (%s)((VkUniqueObject*)%s%s)->actualObject;\n' % (indent, prefix, name, struct_uses[obj], prefix, name)
1516 pre_code += '%s%s* p%s = (%s*)%s%s%s;\n' % (indent, struct_uses[obj], name, struct_uses[obj], deref_txt, prefix, name)
1517 pre_code += '%s*p%s = (%s)((VkUniqueObject*)%s%s)->actualObject;\n' % (indent, name, struct_uses[obj], prefix, name)
1518 indent = indent[4:]
1519 pre_code += '%s}\n' % (indent)
1529 indent = ' ' # indent level for generated code
1570 pre_call_txt += '%s%s local_%s = %s;\n' % (indent, struct_uses[del_obj], del_obj, del_obj)
1601 post_call_txt += '%sif (VK_SUCCESS == result) {\n' % (indent)
1602 indent += ' '
1606 post_call_txt += '%sstd::vector<VkUniqueObject*> %s = {};\n' % (indent, local_name)
1607 post_call_txt += '%sfor (uint32_t i=0; i<%s; ++i) {\n' % (indent, custom_create_dict[obj_name])
1608 indent += ' '
1609 post_call_txt += '%s%s.push_back(new VkUniqueObject());\n' % (indent, local_name)
1610 post_call_txt += '%s%s[i]->actualObject = (uint64_t)%s[i];\n' % (indent, local_name, obj_name)
1611 post_call_txt += '%s%s[i] = (%s)%s[i];\n' % (indent, obj_name, obj_type, local_name)
1612 indent = indent[4:]
1613 post_call_txt += '%s}\n' % (indent)
1616 post_call_txt += '%sVkUniqueObject* %s = new VkUniqueObject();\n' % (indent, local_name)
1617 post_call_txt += '%s%s->actualObject = (uint64_t)*%s;\n' % (indent, local_name, obj_name)
1618 post_call_txt += '%s*%s = (%s)%s;\n' % (indent, obj_name, obj_type, local_name)
1619 indent = indent[4:]
1620 post_call_txt += '%s}\n' % (indent)
1625 post_call_txt += '%sfor (uint32_t i=0; i<%s; ++i) {\n' % (indent, del_obj)
1627 indent += ' '
1628 post_call_txt += '%sdelete (VkUniqueObject*)%s[i];\n' % (indent, del_obj)
1629 indent = indent[4:]
1630 post_call_txt += '%s}\n' % (indent)
1633 post_call_txt = '%sdelete (VkUniqueObject*)local_%s;\n' % (indent, proto.params[-2].name)