• Home
  • Raw
  • Download

Lines Matching refs:mBuilder

355     SPIRVBuilder mBuilder;  member in sh::__anonfc5978be0111::OutputSPIRVTraverser
459 mBuilder(compiler, in OutputSPIRVTraverser()
545 const spirv::IdRef typeId = mBuilder.getTypeData(type, {}).id; in getSymbolIdAndStorageClass()
546 const spirv::IdRef varId = mBuilder.declareVariable( in getSymbolIdAndStorageClass()
547 typeId, *storageClass, mBuilder.getDecorations(type), nullptr, name); in getSymbolIdAndStorageClass()
549 mBuilder.addEntryPointInterfaceVariableId(varId); in getSymbolIdAndStorageClass()
550 spirv::WriteDecorate(mBuilder.getSpirvDecorations(), varId, spv::DecorationBuiltIn, in getSymbolIdAndStorageClass()
695 swizzleIds.push_back(mBuilder.getUintConstant(component)); in accessChainPushDynamicComponent()
698 const spirv::IdRef uintTypeId = mBuilder.getBasicTypeId(EbtUInt, 1); in accessChainPushDynamicComponent()
699 const spirv::IdRef uvecTypeId = mBuilder.getBasicTypeId(EbtUInt, swizzleIds.size()); in accessChainPushDynamicComponent()
701 const spirv::IdRef swizzlesId = mBuilder.getNewId({}); in accessChainPushDynamicComponent()
702 spirv::WriteConstantComposite(mBuilder.getSpirvTypeAndConstantDecls(), uvecTypeId, in accessChainPushDynamicComponent()
707 const spirv::IdRef newIndex = mBuilder.getNewId({}); in accessChainPushDynamicComponent()
708 spirv::WriteVectorExtractDynamic(mBuilder.getSpirvCurrentFunctionBlock(), uintTypeId, in accessChainPushDynamicComponent()
743 mBuilder.getTypePointerId(accessChain.preSwizzleTypeId, accessChain.storageClass); in accessChainCollapse()
745 accessChain.accessChainId = mBuilder.getNewId({}); in accessChainCollapse()
746 spirv::WriteAccessChain(mBuilder.getSpirvCurrentFunctionBlock(), typePointerId, in accessChainCollapse()
756 const SpirvDecorations &decorations = mBuilder.getDecorations(valueType); in accessChainLoad()
792 const spirv::IdRef result = mBuilder.getNewId(decorations); in accessChainLoad()
793 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), in accessChainLoad()
802 mBuilder.declareVariable(accessChain.baseTypeId, spv::StorageClassFunction, in accessChainLoad()
806 spirv::WriteStore(mBuilder.getSpirvCurrentFunctionBlock(), tempVar, loadResult, in accessChainLoad()
815 loadResult = mBuilder.getNewId(decorations); in accessChainLoad()
816 spirv::WriteLoad(mBuilder.getSpirvCurrentFunctionBlock(), in accessChainLoad()
825 loadResult = mBuilder.getNewId(decorations); in accessChainLoad()
826 spirv::WriteLoad(mBuilder.getSpirvCurrentFunctionBlock(), accessChain.preSwizzleTypeId, in accessChainLoad()
842 const spirv::IdRef result = mBuilder.getNewId(decorations); in accessChainLoad()
843 spirv::WriteVectorShuffle(mBuilder.getSpirvCurrentFunctionBlock(), in accessChainLoad()
855 const spirv::IdRef result = mBuilder.getNewId(decorations); in accessChainLoad()
856 spirv::WriteVectorExtractDynamic(mBuilder.getSpirvCurrentFunctionBlock(), in accessChainLoad()
898 const spirv::IdRef loadResult = mBuilder.getNewId({}); in accessChainStore()
899 spirv::WriteLoad(mBuilder.getSpirvCurrentFunctionBlock(), accessChain.preSwizzleTypeId, in accessChainStore()
931 const spirv::IdRef result = mBuilder.getNewId({}); in accessChainStore()
932 spirv::WriteVectorShuffle(mBuilder.getSpirvCurrentFunctionBlock(), in accessChainStore()
938 spirv::WriteStore(mBuilder.getSpirvCurrentFunctionBlock(), accessChainId, value, nullptr); in accessChainStore()
950 indexId = mBuilder.getUintConstant(data->idList[index].literal); in makeAccessChainIdList()
1012 mBuilder.declareSpecConst(type.getBasicType(), type.getLayoutQualifier().location, in declareSpecConst()
1013 mBuilder.hashName(variable).data()); in declareSpecConst()
1025 const spirv::IdRef typeId = mBuilder.getTypeData(type, {}).id; in createConstant()
1038 return mBuilder.getNullConstant(typeId); in createConstant()
1071 componentId = mBuilder.getFloatConstant(castConstant.getFConst()); in createConstant()
1074 componentId = mBuilder.getIntConstant(castConstant.getIConst()); in createConstant()
1077 componentId = mBuilder.getUintConstant(castConstant.getUConst()); in createConstant()
1080 componentId = mBuilder.getBoolConstant(castConstant.getBConst()); in createConstant()
1110 mBuilder.getBasicTypeId(type.getBasicType(), type.getRows()); in createComplexConstant()
1118 columnIds.push_back(mBuilder.getCompositeConstant(columnTypeId, columnParameters)); in createComplexConstant()
1121 return mBuilder.getCompositeConstant(typeId, columnIds); in createComplexConstant()
1124 return mBuilder.getCompositeConstant(typeId, parameters); in createComplexConstant()
1138 return mBuilder.getNullConstant(typeId); in createConstructor()
1237 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in createArrayOrStructConstructor()
1238 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in createArrayOrStructConstructor()
1252 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(type)); in createConstructorVectorFromScalar()
1253 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in createConstructorVectorFromScalar()
1279 argumentTypeId = mBuilder.getTypeData(arg0TypeAsVector, {}).id; in createConstructorVectorFromMatrix()
1282 spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in createConstructorVectorFromMatrix()
1283 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), argumentTypeId, result, in createConstructorVectorFromMatrix()
1303 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in createConstructorVectorFromScalarsAndVectors()
1304 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in createConstructorVectorFromScalarsAndVectors()
1326 SpirvDecorations decorations = mBuilder.getDecorations(type); in createConstructorMatrixFromScalar()
1331 zeroId = mBuilder.getFloatConstant(0); in createConstructorMatrixFromScalar()
1334 zeroId = mBuilder.getIntConstant(0); in createConstructorMatrixFromScalar()
1337 zeroId = mBuilder.getUintConstant(0); in createConstructorMatrixFromScalar()
1340 zeroId = mBuilder.getBoolConstant(0); in createConstructorMatrixFromScalar()
1349 const spirv::IdRef columnTypeId = mBuilder.getBasicTypeId(type.getBasicType(), type.getRows()); in createConstructorMatrixFromScalar()
1353 columnIds.push_back(mBuilder.getNewId(decorations)); in createConstructorMatrixFromScalar()
1366 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in createConstructorMatrixFromScalar()
1371 const spirv::IdRef result = mBuilder.getNewId(decorations); in createConstructorMatrixFromScalar()
1372 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in createConstructorMatrixFromScalar()
1390 SpirvDecorations decorations = mBuilder.getDecorations(type); in createConstructorMatrixFromVectors()
1397 const spirv::IdRef columnTypeId = mBuilder.getBasicTypeId(type.getBasicType(), type.getRows()); in createConstructorMatrixFromVectors()
1402 columnIds.push_back(mBuilder.getNewId(decorations)); in createConstructorMatrixFromVectors()
1408 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in createConstructorMatrixFromVectors()
1412 const spirv::IdRef result = mBuilder.getNewId(decorations); in createConstructorMatrixFromVectors()
1413 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in createConstructorMatrixFromVectors()
1445 SpirvDecorations decorations = mBuilder.getDecorations(type); in createConstructorMatrixFromMatrix()
1451 const spirv::IdRef columnTypeId = mBuilder.getBasicTypeId(type.getBasicType(), type.getRows()); in createConstructorMatrixFromMatrix()
1457 SpirvType paramColumnType = mBuilder.getSpirvType(parameterType, {}); in createConstructorMatrixFromMatrix()
1460 mBuilder.getSpirvTypeData(paramColumnType, nullptr).id; in createConstructorMatrixFromMatrix()
1470 const spirv::IdRef parameterColumnId = mBuilder.getNewId(decorations); in createConstructorMatrixFromMatrix()
1471 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), paramColumnTypeId, in createConstructorMatrixFromMatrix()
1479 constructorColumnId = mBuilder.getNewId(decorations); in createConstructorMatrixFromMatrix()
1480 spirv::WriteVectorShuffle(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in createConstructorMatrixFromMatrix()
1492 SpirvType paramComponentType = mBuilder.getSpirvType(parameterType, {}); in createConstructorMatrixFromMatrix()
1496 mBuilder.getSpirvTypeData(paramComponentType, nullptr).id; in createConstructorMatrixFromMatrix()
1508 componentId = mBuilder.getNewId(decorations); in createConstructorMatrixFromMatrix()
1509 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), in createConstructorMatrixFromMatrix()
1520 componentId = mBuilder.getFloatConstant(isOnDiagonal ? 0.0f : 1.0f); in createConstructorMatrixFromMatrix()
1523 componentId = mBuilder.getIntConstant(isOnDiagonal ? 0 : 1); in createConstructorMatrixFromMatrix()
1526 componentId = mBuilder.getUintConstant(isOnDiagonal ? 0 : 1); in createConstructorMatrixFromMatrix()
1529 componentId = mBuilder.getBoolConstant(isOnDiagonal); in createConstructorMatrixFromMatrix()
1540 columnIds.push_back(mBuilder.getNewId(decorations)); in createConstructorMatrixFromMatrix()
1541 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in createConstructorMatrixFromMatrix()
1546 const spirv::IdRef result = mBuilder.getNewId(decorations); in createConstructorMatrixFromMatrix()
1547 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in createConstructorMatrixFromMatrix()
1580 const SpirvDecorations decorations = mBuilder.getDecorations(node->getType()); in extractComponents()
1605 SpirvType componentType = mBuilder.getSpirvType(argumentType, {}); in extractComponents()
1609 mBuilder.getSpirvTypeData(componentType, nullptr).id; in extractComponents()
1622 const spirv::IdRef componentId = mBuilder.getNewId(decorations); in extractComponents()
1623 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), in extractComponents()
1634 SpirvType componentType = mBuilder.getSpirvType(argumentType, {}); in extractComponents()
1637 const spirv::IdRef componentTypeId = mBuilder.getSpirvTypeData(componentType, nullptr).id; in extractComponents()
1650 const spirv::IdRef componentId = mBuilder.getNewId(decorations); in extractComponents()
1652 mBuilder.getSpirvCurrentFunctionBlock(), componentTypeId, componentId, in extractComponents()
1679 mNodeData.back().idList.push_back(mBuilder.getSpirvCurrentFunctionBlockId()); in startShortCircuit()
1682 mBuilder.startConditional(2, false, false); in startShortCircuit()
1685 const SpirvConditional *conditional = mBuilder.getCurrentConditional(); in startShortCircuit()
1694 mBuilder.writeBranchConditional(left, trueBlock, falseBlock, mergeBlock); in startShortCircuit()
1705 const spirv::IdRef rightBlockId = mBuilder.getSpirvCurrentFunctionBlockId(); in endShortCircuit()
1713 mBuilder.writeBranchConditionalBlockEnd(); in endShortCircuit()
1716 mBuilder.endConditional(); in endShortCircuit()
1724 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in endShortCircuit()
1727 mBuilder.getSpirvCurrentFunctionBlock(), *typeId, result, in endShortCircuit()
1802 tempVarTypeIds[paramIndex] = mBuilder.getTypeData(paramType, {}).id; in createFunctionCall()
1804 mBuilder.declareVariable(tempVarTypeIds[paramIndex], spv::StorageClassFunction, in createFunctionCall()
1805 mBuilder.getDecorations(paramType), nullptr, "param"); in createFunctionCall()
1812 spirv::WriteStore(mBuilder.getSpirvCurrentFunctionBlock(), tempVarIds[paramIndex], in createFunctionCall()
1823 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in createFunctionCall()
1824 spirv::WriteFunctionCall(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, in createFunctionCall()
2515 const SpirvDecorations decorations = mBuilder.getDecorations(node->getType()); in visitOperator()
2519 result = mBuilder.getNewId(decorations); in visitOperator()
2529 builtInResult = mBuilder.getNewId({}); in visitOperator()
2541 const SpirvDecorations operandDecorations = mBuilder.getDecorations(firstOperandType); in visitOperator()
2544 mBuilder.getBasicTypeId(firstOperandType.getBasicType(), firstOperandType.getRows()); in visitOperator()
2554 const spirv::IdRef columnIdA = mBuilder.getNewId(operandDecorations); in visitOperator()
2555 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in visitOperator()
2559 columnIds.push_back(mBuilder.getNewId(decorations)); in visitOperator()
2563 writeUnaryOp(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in visitOperator()
2570 const spirv::IdRef columnIdB = mBuilder.getNewId(operandDecorations); in visitOperator()
2571 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in visitOperator()
2575 writeBinaryOp(mBuilder.getSpirvCurrentFunctionBlock(), columnTypeId, in visitOperator()
2581 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), builtInResultTypeId, in visitOperator()
2587 writeUnaryOp(mBuilder.getSpirvCurrentFunctionBlock(), builtInResultTypeId, builtInResult, in visitOperator()
2619 writeBinaryOp(mBuilder.getSpirvCurrentFunctionBlock(), builtInResultTypeId, builtInResult, in visitOperator()
2632 writeTernaryOp(mBuilder.getSpirvCurrentFunctionBlock(), builtInResultTypeId, builtInResult, in visitOperator()
2639 writeQuaternaryOp(mBuilder.getSpirvCurrentFunctionBlock(), builtInResultTypeId, in visitOperator()
2648 spirv::WriteExtInst(mBuilder.getSpirvCurrentFunctionBlock(), builtInResultTypeId, in visitOperator()
2649 builtInResult, mBuilder.getExtInstImportIdStd(), in visitOperator()
2707 spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(operandType)); in createIncrementDecrement()
2708 const spirv::IdRef one = isFloat ? mBuilder.getFloatConstant(1) : mBuilder.getIntConstant(1); in createIncrementDecrement()
2710 writeBinaryOp(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, value, one); in createIncrementDecrement()
2731 const SpirvDecorations resultDecorations = mBuilder.getDecorations(node->getType()); in createCompare()
2732 const SpirvDecorations operandDecorations = mBuilder.getDecorations(operandType); in createCompare()
2859 const spirv::IdScope scopeId = mBuilder.getUintConstant(spv::ScopeDevice); in createAtomicBuiltIn()
2863 mBuilder.getUintConstant(spv::MemorySemanticsMaskNone); in createAtomicBuiltIn()
2867 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in createAtomicBuiltIn()
2876 mBuilder.getTypePointerId(resultTypeId, spv::StorageClassImage); in createAtomicBuiltIn()
2877 const spirv::IdRef texelPointerId = mBuilder.getNewId({}); in createAtomicBuiltIn()
2881 : mBuilder.getUintConstant(0); in createAtomicBuiltIn()
2883 spirv::WriteImageTexelPointer(mBuilder.getSpirvCurrentFunctionBlock(), texelTypePointerId, in createAtomicBuiltIn()
2925 spirv::WriteAtomicCompareExchange(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, in createAtomicBuiltIn()
2935 writeAtomicOp(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, pointerId, scopeId, in createAtomicBuiltIn()
3368 SpirvType imageType = mBuilder.getSpirvType(samplerType, {}); in createImageTextureBuiltIn()
3371 const spirv::IdRef extractedImageTypeId = mBuilder.getSpirvTypeData(imageType, nullptr).id; in createImageTextureBuiltIn()
3374 const spirv::IdRef extractedImage = mBuilder.getNewId({}); in createImageTextureBuiltIn()
3375 spirv::WriteImage(mBuilder.getSpirvCurrentFunctionBlock(), extractedImageTypeId, in createImageTextureBuiltIn()
3408 SpirvType drefSpirvType = mBuilder.getSpirvType(*coordinatesType, {}); in createImageTextureBuiltIn()
3410 const spirv::IdRef drefTypeId = mBuilder.getSpirvTypeData(drefSpirvType, nullptr).id; in createImageTextureBuiltIn()
3413 drefId = mBuilder.getNewId(mBuilder.getDecorations(*coordinatesType)); in createImageTextureBuiltIn()
3414 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), drefTypeId, drefId, in createImageTextureBuiltIn()
3427 gatherComponentId = mBuilder.getIntConstant(0); in createImageTextureBuiltIn()
3456 imageOperandsList.push_back(spirvOp == spv::OpImageFetch ? mBuilder.getUintConstant(0) in createImageTextureBuiltIn()
3457 : mBuilder.getFloatConstant(0)); in createImageTextureBuiltIn()
3478 mBuilder.addCapability(spv::CapabilityImageGatherExtended); in createImageTextureBuiltIn()
3487 mBuilder.addCapability(spv::CapabilityImageGatherExtended); in createImageTextureBuiltIn()
3545 SpirvType spirvType = mBuilder.getSpirvType(*coordinatesType, {}); in createImageTextureBuiltIn()
3546 const spirv::IdRef coordinatesTypeId = mBuilder.getSpirvTypeData(spirvType, nullptr).id; in createImageTextureBuiltIn()
3548 const spirv::IdRef channelTypeId = mBuilder.getSpirvTypeData(spirvType, nullptr).id; in createImageTextureBuiltIn()
3552 mBuilder.getNewId(mBuilder.getDecorations(*coordinatesType)); in createImageTextureBuiltIn()
3553 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), channelTypeId, in createImageTextureBuiltIn()
3560 mBuilder.getNewId(mBuilder.getDecorations(*coordinatesType)); in createImageTextureBuiltIn()
3561 spirv::WriteCompositeInsert(mBuilder.getSpirvCurrentFunctionBlock(), coordinatesTypeId, in createImageTextureBuiltIn()
3607 result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in createImageTextureBuiltIn()
3613 mBuilder.addCapability(spv::CapabilityImageQuery); in createImageTextureBuiltIn()
3615 spirv::WriteImageQuerySizeLod(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, in createImageTextureBuiltIn()
3619 mBuilder.addCapability(spv::CapabilityImageQuery); in createImageTextureBuiltIn()
3620 spirv::WriteImageQuerySize(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, in createImageTextureBuiltIn()
3624 mBuilder.addCapability(spv::CapabilityImageQuery); in createImageTextureBuiltIn()
3625 spirv::WriteImageQueryLod(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, in createImageTextureBuiltIn()
3629 mBuilder.addCapability(spv::CapabilityImageQuery); in createImageTextureBuiltIn()
3630 spirv::WriteImageQueryLevels(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, in createImageTextureBuiltIn()
3634 mBuilder.addCapability(spv::CapabilityImageQuery); in createImageTextureBuiltIn()
3635 spirv::WriteImageQuerySamples(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, in createImageTextureBuiltIn()
3639 spirv::WriteImageSampleImplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3644 spirv::WriteImageSampleExplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3649 spirv::WriteImageSampleDrefImplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3654 spirv::WriteImageSampleDrefExplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3659 spirv::WriteImageSampleProjImplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3664 spirv::WriteImageSampleProjExplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3669 spirv::WriteImageSampleProjDrefImplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3674 spirv::WriteImageSampleProjDrefExplicitLod(mBuilder.getSpirvCurrentFunctionBlock(), in createImageTextureBuiltIn()
3679 spirv::WriteImageFetch(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, in createImageTextureBuiltIn()
3683 spirv::WriteImageGather(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, in createImageTextureBuiltIn()
3688 spirv::WriteImageDrefGather(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, in createImageTextureBuiltIn()
3693 spirv::WriteImageRead(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, in createImageTextureBuiltIn()
3697 spirv::WriteImageWrite(mBuilder.getSpirvCurrentFunctionBlock(), image, coordinatesId, in createImageTextureBuiltIn()
3718 mBuilder.addCapability(spv::CapabilityInterpolationFunction); in createInterpolate()
3748 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in createInterpolate()
3750 spirv::WriteExtInst(mBuilder.getSpirvCurrentFunctionBlock(), resultTypeId, result, in createInterpolate()
3751 mBuilder.getExtInstImportIdStd(), in createInterpolate()
3767 SpirvType valueSpirvType = mBuilder.getSpirvType(valueType, {}); in castBasicType()
3770 const spirv::IdRef castTypeId = mBuilder.getSpirvTypeData(valueSpirvType, nullptr).id; in castBasicType()
3772 const spirv::IdRef castValue = mBuilder.getNewId(mBuilder.getDecorations(valueType)); in castBasicType()
3802 zero = mBuilder.getVecConstant(0, valueType.getNominalSize()); in castBasicType()
3823 zero = mBuilder.getUvecConstant(0, valueType.getNominalSize()); in castBasicType()
3836 zero = mBuilder.getVecConstant(0, valueType.getNominalSize()); in castBasicType()
3837 one = mBuilder.getVecConstant(1, valueType.getNominalSize()); in castBasicType()
3840 zero = mBuilder.getIvecConstant(0, valueType.getNominalSize()); in castBasicType()
3841 one = mBuilder.getIvecConstant(1, valueType.getNominalSize()); in castBasicType()
3844 zero = mBuilder.getUvecConstant(0, valueType.getNominalSize()); in castBasicType()
3845 one = mBuilder.getUvecConstant(1, valueType.getNominalSize()); in castBasicType()
3859 writeUnaryOp(mBuilder.getSpirvCurrentFunctionBlock(), castTypeId, castValue, value); in castBasicType()
3863 writeBinaryOp(mBuilder.getSpirvCurrentFunctionBlock(), castTypeId, castValue, value, zero); in castBasicType()
3868 writeTernaryOp(mBuilder.getSpirvCurrentFunctionBlock(), castTypeId, castValue, value, one, in castBasicType()
3927 mBuilder.getTypeData(elementType, valueElementTypeSpec).id; in cast()
3929 const SpirvDecorations elementDecorations = mBuilder.getDecorations(elementType); in cast()
3935 const spirv::IdRef elementId = mBuilder.getNewId(elementDecorations); in cast()
3936 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), elementTypeId, in cast()
3960 const spirv::IdRef fieldTypeId = mBuilder.getTypeData(fieldType, valueFieldTypeSpec).id; in cast()
3963 const spirv::IdRef fieldId = mBuilder.getNewId(mBuilder.getDecorations(fieldType)); in cast()
3964 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), fieldTypeId, in cast()
3993 const spirv::IdRef expectedTypeId = mBuilder.getTypeData(valueType, expectedTypeSpec).id; in cast()
3994 const spirv::IdRef expectedId = mBuilder.getNewId(mBuilder.getDecorations(valueType)); in cast()
3996 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), expectedTypeId, in cast()
4017 const spirv::IdRef result = mBuilder.getNewId(decorations); in reduceBoolVector()
4019 writeBinaryOp(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, valueIds[0], in reduceBoolVector()
4030 const spirv::IdRef bvecTypeId = mBuilder.getBasicTypeId(EbtBool, valueIds.size()); in reduceBoolVector()
4031 valueId = {mBuilder.getNewId(decorations)}; in reduceBoolVector()
4033 spirv::WriteCompositeConstruct(mBuilder.getSpirvCurrentFunctionBlock(), bvecTypeId, valueId, in reduceBoolVector()
4037 const spirv::IdRef result = mBuilder.getNewId(decorations); in reduceBoolVector()
4038 writeUnaryOp(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, valueId); in reduceBoolVector()
4149 leftComponentId = mBuilder.getNewId(operandDecorations); in createCompareImpl()
4150 rightComponentId = mBuilder.getNewId(operandDecorations); in createCompareImpl()
4153 mBuilder.getBasicTypeId(operandType.getBasicType(), operandType.getNominalSize()); in createCompareImpl()
4155 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), componentTypeId, in createCompareImpl()
4157 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), componentTypeId, in createCompareImpl()
4162 spirv::IdRef result = mBuilder.getNewId({}); in createCompareImpl()
4166 opResultTypeId = mBuilder.getBasicTypeId(EbtBool, operandType.getNominalSize()); in createCompareImpl()
4170 writeBinaryOp(mBuilder.getSpirvCurrentFunctionBlock(), opResultTypeId, result, leftComponentId, in createCompareImpl()
4233 const spirv::IdRef structTypeId = mBuilder.getTypeData(structType, {}).id; in makeBuiltInOutputStructType()
4262 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), returnValueType, in storeBuiltInStructOutputInParamsAndReturnValue()
4291 spirv::IdRef fieldTypeId = mBuilder.getTypeData(param->getType(), {}).id; in storeBuiltInStructOutputInParamHelper()
4292 spirv::IdRef fieldValueId = mBuilder.getNewId(mBuilder.getDecorations(param->getType())); in storeBuiltInStructOutputInParamHelper()
4294 spirv::WriteCompositeExtract(mBuilder.getSpirvCurrentFunctionBlock(), fieldTypeId, fieldValueId, in storeBuiltInStructOutputInParamHelper()
4339 const spirv::IdRef typeId = mBuilder.getTypeData(type, typeSpec).id; in visitSymbol()
4408 const spirv::IdRef typeId = mBuilder.getTypeData(type, {}).id; in visitConstantUnion()
4449 mBuilder.getTypeData(node->getType(), mNodeData.back().accessChain.typeSpec).id; in visitSwizzle()
4514 mBuilder.getTypeData(node->getType(), mNodeData.back().accessChain.typeSpec).id; in visitBinary()
4536 const spirv::IdRef resultTypeId = mBuilder.getTypeData(node->getType(), resultTypeSpec).id; in visitBinary()
4627 const spirv::IdRef intTypeId = mBuilder.getBasicTypeId(EbtInt, 1); in visitUnary()
4628 const spirv::IdRef uintTypeId = mBuilder.getBasicTypeId(EbtUInt, 1); in visitUnary()
4631 const spirv::IdRef resultId = mBuilder.getNewId({}); in visitUnary()
4632 spirv::WriteArrayLength(mBuilder.getSpirvCurrentFunctionBlock(), uintTypeId, resultId, in visitUnary()
4636 const spirv::IdRef castResultId = mBuilder.getNewId({}); in visitUnary()
4637 spirv::WriteBitcast(mBuilder.getSpirvCurrentFunctionBlock(), intTypeId, castResultId, in visitUnary()
4646 const spirv::IdRef resultTypeId = mBuilder.getTypeData(node->getType(), {}).id; in visitUnary()
4686 typeId = mBuilder.getBasicTypeId(node->getCondition()->getType().getBasicType(), in visitTernary()
4698 mBuilder.startConditional(3, false, false); in visitTernary()
4701 const SpirvConditional *conditional = mBuilder.getCurrentConditional(); in visitTernary()
4707 mBuilder.writeBranchConditional(conditionValue, trueBlockId, falseBlockId, mergeBlockId); in visitTernary()
4722 mBuilder.writeBranchConditionalBlockEnd(); in visitTernary()
4728 const spirv::IdRef result = mBuilder.getNewId(mBuilder.getDecorations(node->getType())); in visitTernary()
4738 spirv::WriteSelect(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in visitTernary()
4743 const SpirvConditional *conditional = mBuilder.getCurrentConditional(); in visitTernary()
4748 spirv::WritePhi(mBuilder.getSpirvCurrentFunctionBlock(), typeId, result, in visitTernary()
4752 mBuilder.endConditional(); in visitTernary()
4781 mBuilder.startConditional(node->getChildCount(), false, false); in visitIfElse()
4784 const SpirvConditional *conditional = mBuilder.getCurrentConditional(); in visitIfElse()
4800 mBuilder.writeBranchConditional(conditionValue, trueBlock, falseBlock, mergeBlock); in visitIfElse()
4806 mBuilder.writeBranchConditionalBlockEnd(); in visitIfElse()
4811 mBuilder.endConditional(); in visitIfElse()
4948 mBuilder.startConditional(blockCount, false, true); in visitSwitch()
4951 const SpirvConditional *conditional = mBuilder.getCurrentConditional(); in visitSwitch()
4972 mBuilder.writeSwitch(conditionValue, defaultBlock, switchTargets, mergeBlock); in visitSwitch()
4977 mBuilder.writeSwitchCaseBlockEnd(); in visitSwitch()
4978 mBuilder.endConditional(); in visitSwitch()
5006 mBuilder.writeSwitchCaseBlockEnd(); in visitCase()
5070 spirv::WriteFunction(mBuilder.getSpirvFunctions(), ids.returnTypeId, ids.functionId, in visitFunctionDefinition()
5078 mBuilder.getNewId(mBuilder.getDecorations(paramVariable->getType())); in visitFunctionDefinition()
5079 spirv::WriteFunctionParameter(mBuilder.getSpirvFunctions(), in visitFunctionDefinition()
5086 spirv::WriteName(mBuilder.getSpirvDebug(), paramId, in visitFunctionDefinition()
5087 mBuilder.hashName(paramVariable).data()); in visitFunctionDefinition()
5090 mBuilder.startNewFunction(ids.functionId, function); in visitFunctionDefinition()
5096 if (!mBuilder.isCurrentFunctionBlockTerminated()) in visitFunctionDefinition()
5100 spirv::WriteReturn(mBuilder.getSpirvCurrentFunctionBlock()); in visitFunctionDefinition()
5114 nullConstant = mBuilder.getFloatConstant(0); in visitFunctionDefinition()
5117 nullConstant = mBuilder.getUintConstant(0); in visitFunctionDefinition()
5120 nullConstant = mBuilder.getIntConstant(0); in visitFunctionDefinition()
5128 nullConstant = mBuilder.getNullConstant(mFunctionIdMap[function].returnTypeId); in visitFunctionDefinition()
5130 spirv::WriteReturnValue(mBuilder.getSpirvCurrentFunctionBlock(), nullConstant); in visitFunctionDefinition()
5132 mBuilder.terminateCurrentFunctionBlock(); in visitFunctionDefinition()
5135 mBuilder.assembleSpirvFunctionBlocks(); in visitFunctionDefinition()
5138 spirv::WriteFunctionEnd(mBuilder.getSpirvFunctions()); in visitFunctionDefinition()
5164 spirv::WriteDecorate(mBuilder.getSpirvDecorations(), variableId, spv::DecorationInvariant, {}); in visitGlobalQualifierDeclaration()
5182 ids.returnTypeId = mBuilder.getTypeData(function->getReturnType(), {}).id; in visitFunctionPrototype()
5189 spirv::IdRef paramId = mBuilder.getTypeData(paramType, {}).id; in visitFunctionPrototype()
5198 paramId = mBuilder.getTypePointerId(paramId, storageClass); in visitFunctionPrototype()
5204 ids.functionTypeId = mBuilder.getFunctionTypeId(ids.returnTypeId, ids.parameterTypeIds); in visitFunctionPrototype()
5210 ids.functionId = mBuilder.getNewId(mBuilder.getDecorations(function->getReturnType())); in visitFunctionPrototype()
5215 mBuilder.setEntryPointId(ids.functionId); in visitFunctionPrototype()
5244 const spirv::IdRef resultTypeId = mBuilder.getTypeData(node->getType(), {}).id; in visitAggregate()
5262 mBuilder.getSpirvCurrentFunctionBlock(), in visitAggregate()
5263 mBuilder.getUintConstant(spv::ScopeWorkgroup), in visitAggregate()
5264 mBuilder.getUintConstant(spv::ScopeWorkgroup), in visitAggregate()
5265 mBuilder.getUintConstant(spv::MemorySemanticsWorkgroupMemoryMask | in visitAggregate()
5271 spirv::WriteControlBarrier(mBuilder.getSpirvCurrentFunctionBlock(), in visitAggregate()
5272 mBuilder.getUintConstant(spv::ScopeWorkgroup), in visitAggregate()
5273 mBuilder.getUintConstant(spv::ScopeInvocation), in visitAggregate()
5274 mBuilder.getUintConstant(spv::MemorySemanticsMaskNone)); in visitAggregate()
5282 mBuilder.getSpirvCurrentFunctionBlock(), mBuilder.getUintConstant(scope), in visitAggregate()
5283 mBuilder.getUintConstant(spv::MemorySemanticsUniformMemoryMask | in visitAggregate()
5291 mBuilder.getSpirvCurrentFunctionBlock(), mBuilder.getUintConstant(spv::ScopeDevice), in visitAggregate()
5292 mBuilder.getUintConstant(spv::MemorySemanticsUniformMemoryMask | in visitAggregate()
5297 mBuilder.getSpirvCurrentFunctionBlock(), mBuilder.getUintConstant(spv::ScopeDevice), in visitAggregate()
5298 mBuilder.getUintConstant(spv::MemorySemanticsImageMemoryMask | in visitAggregate()
5303 mBuilder.getSpirvCurrentFunctionBlock(), mBuilder.getUintConstant(spv::ScopeDevice), in visitAggregate()
5304 mBuilder.getUintConstant(spv::MemorySemanticsWorkgroupMemoryMask | in visitAggregate()
5400 !mBuilder.isInLoop() && in visitDeclaration()
5430 const spirv::IdRef typeId = mBuilder.getTypeData(type, {}).id; in visitDeclaration()
5434 SpirvDecorations decorations = mBuilder.getDecorations(type); in visitDeclaration()
5435 if (mBuilder.isInvariantOutput(type)) in visitDeclaration()
5441 const spirv::IdRef variableId = mBuilder.declareVariable( in visitDeclaration()
5443 mBuilder.hashName(variable).data()); in visitDeclaration()
5448 spirv::WriteStore(mBuilder.getSpirvCurrentFunctionBlock(), variableId, initializerId, in visitDeclaration()
5459 SpirvType elementType = mBuilder.getSpirvType(type, {}); in visitDeclaration()
5461 nonArrayTypeId = mBuilder.getSpirvTypeData(elementType, nullptr).id; in visitDeclaration()
5467 mBuilder.addEntryPointInterfaceVariableId(variableId); in visitDeclaration()
5474 mBuilder.writePerVertexBuiltIns(type, nonArrayTypeId); in visitDeclaration()
5478 spirv::WriteDecorate(mBuilder.getSpirvDecorations(), nonArrayTypeId, in visitDeclaration()
5487 spirv::WriteDecorate(mBuilder.getSpirvDecorations(), nonArrayTypeId, decoration, {}); in visitDeclaration()
5491 mBuilder.writeInterfaceVariableDecorations(type, variableId); in visitDeclaration()
5663 mBuilder.startConditional(blockCount, true, true); in visitLoop()
5666 const SpirvConditional *conditional = mBuilder.getCurrentConditional(); in visitLoop()
5672 mBuilder.writeLoopHeader(loopType == ELoopDoWhile ? bodyBlock : condBlock, continueBlock, in visitLoop()
5683 mBuilder.writeLoopConditionEnd(conditionValue, bodyBlock, mergeBlock); in visitLoop()
5693 mBuilder.writeLoopBodyEnd(continueBlock); in visitLoop()
5708 mBuilder.writeLoopContinueEnd(headerBlock); in visitLoop()
5715 mBuilder.writeLoopContinueEnd(headerBlock); in visitLoop()
5726 mBuilder.writeLoopConditionEnd(conditionValue, headerBlock, mergeBlock); in visitLoop()
5733 mBuilder.endConditional(); in visitLoop()
5753 spirv::WriteKill(mBuilder.getSpirvCurrentFunctionBlock()); in visitBranch()
5754 mBuilder.terminateCurrentFunctionBlock(); in visitBranch()
5757 spirv::WriteBranch(mBuilder.getSpirvCurrentFunctionBlock(), in visitBranch()
5758 mBuilder.getBreakTargetId()); in visitBranch()
5759 mBuilder.terminateCurrentFunctionBlock(); in visitBranch()
5762 spirv::WriteBranch(mBuilder.getSpirvCurrentFunctionBlock(), in visitBranch()
5763 mBuilder.getContinueTargetId()); in visitBranch()
5764 mBuilder.terminateCurrentFunctionBlock(); in visitBranch()
5776 spirv::WriteReturnValue(mBuilder.getSpirvCurrentFunctionBlock(), expressionValue); in visitBranch()
5777 mBuilder.terminateCurrentFunctionBlock(); in visitBranch()
5781 spirv::WriteReturn(mBuilder.getSpirvCurrentFunctionBlock()); in visitBranch()
5782 mBuilder.terminateCurrentFunctionBlock(); in visitBranch()
5800 spirv::Blob result = mBuilder.getSpirv(); in getSpirv()