Lines Matching refs:accessChain
122 AccessChain accessChain; member
171 bool IsAccessChainRValue(const AccessChain &accessChain) in IsAccessChainRValue() argument
173 return accessChain.storageClass == spv::StorageClassMax; in IsAccessChainRValue()
178 return !IsAccessChainRValue(data.accessChain) && data.idList.empty() && in IsAccessChainUnindexedLValue()
179 data.accessChain.swizzles.empty() && !data.accessChain.dynamicComponent.valid(); in IsAccessChainUnindexedLValue()
568 data->accessChain.baseTypeId = typeId; in nodeDataInitLValue()
569 data->accessChain.preSwizzleTypeId = typeId; in nodeDataInitLValue()
570 data->accessChain.storageClass = storageClass; in nodeDataInitLValue()
571 data->accessChain.typeSpec = typeSpec; in nodeDataInitLValue()
583 data->accessChain.baseTypeId = typeId; in nodeDataInitRValue()
584 data->accessChain.preSwizzleTypeId = typeId; in nodeDataInitRValue()
589 AccessChain &accessChain = data->accessChain; in accessChainOnPush() local
595 accessChain.typeSpec.onArrayElementSelection( in accessChainOnPush()
608 accessChain.typeSpec.onBlockFieldSelection(fieldType); in accessChainOnPush()
612 accessChain.typeSpec.onMatrixColumnSelection(); in accessChainOnPush()
617 accessChain.typeSpec.onVectorComponentSelection(); in accessChainOnPush()
627 data->accessChain.areAllIndicesLiteral = false; in accessChainPush()
628 data->accessChain.preSwizzleTypeId = typeId; in accessChainPush()
637 data->accessChain.preSwizzleTypeId = typeId; in accessChainPushLiteral()
645 AccessChain &accessChain = data->accessChain; in accessChainPushSwizzle() local
651 ASSERT(accessChain.swizzles.empty()); in accessChainPushSwizzle()
661 accessChain.swizzles.insert(accessChain.swizzles.end(), swizzle.begin(), swizzle.end()); in accessChainPushSwizzle()
662 accessChain.postSwizzleTypeId = typeId; in accessChainPushSwizzle()
663 accessChain.swizzledVectorComponentCount = componentCount; in accessChainPushSwizzle()
671 AccessChain &accessChain = data->accessChain; in accessChainPushDynamicComponent() local
674 ASSERT(!accessChain.dynamicComponent.valid()); in accessChainPushDynamicComponent()
676 if (IsAccessChainRValue(accessChain) && accessChain.areAllIndicesLiteral) in accessChainPushDynamicComponent()
680 accessChain.dynamicComponent = index; in accessChainPushDynamicComponent()
681 accessChain.postDynamicComponentTypeId = typeId; in accessChainPushDynamicComponent()
685 if (!accessChain.swizzles.empty()) in accessChainPushDynamicComponent()
689 ASSERT(accessChain.swizzles.size() > 1); in accessChainPushDynamicComponent()
693 for (uint32_t component : accessChain.swizzles) in accessChainPushDynamicComponent()
712 accessChain.swizzles.clear(); in accessChainPushDynamicComponent()
721 AccessChain &accessChain = data->accessChain; in accessChainCollapse() local
723 ASSERT(accessChain.storageClass != spv::StorageClassMax); in accessChainCollapse()
725 if (accessChain.accessChainId.valid()) in accessChainCollapse()
727 return accessChain.accessChainId; in accessChainCollapse()
733 accessChain.accessChainId = data->baseId; in accessChainCollapse()
734 return accessChain.accessChainId; in accessChainCollapse()
743 mBuilder.getTypePointerId(accessChain.preSwizzleTypeId, accessChain.storageClass); in accessChainCollapse()
745 accessChain.accessChainId = mBuilder.getNewId({}); in accessChainCollapse()
747 accessChain.accessChainId, data->baseId, indexIds); in accessChainCollapse()
749 return accessChain.accessChainId; in accessChainCollapse()
773 AccessChain &accessChain = data->accessChain; in accessChainLoad() local
782 if (IsAccessChainRValue(accessChain)) in accessChainLoad()
786 if (accessChain.areAllIndicesLiteral) in accessChainLoad()
794 accessChain.preSwizzleTypeId, result, loadResult, in accessChainLoad()
802 mBuilder.declareVariable(accessChain.baseTypeId, spv::StorageClassFunction, in accessChainLoad()
811 data->accessChain.storageClass = spv::StorageClassFunction; in accessChainLoad()
817 accessChain.preSwizzleTypeId, loadResult, accessChainId, nullptr); in accessChainLoad()
826 spirv::WriteLoad(mBuilder.getSpirvCurrentFunctionBlock(), accessChain.preSwizzleTypeId, in accessChainLoad()
830 if (!accessChain.swizzles.empty()) in accessChainLoad()
833 ASSERT(accessChain.swizzles.size() > 1); in accessChainLoad()
837 for (uint32_t component : accessChain.swizzles) in accessChainLoad()
844 accessChain.postSwizzleTypeId, result, loadResult, loadResult, in accessChainLoad()
849 if (accessChain.dynamicComponent.valid()) in accessChainLoad()
852 ASSERT(accessChain.swizzles.empty()); in accessChainLoad()
857 accessChain.postDynamicComponentTypeId, result, loadResult, in accessChainLoad()
858 accessChain.dynamicComponent); in accessChainLoad()
864 cast(loadResult, valueType, accessChain.typeSpec, {}, resultTypeIdOut); in accessChainLoad()
880 AccessChain &accessChain = data->accessChain; in accessChainStore() local
883 ASSERT(accessChain.swizzles.size() != 1); in accessChainStore()
886 ASSERT(!accessChain.dynamicComponent.valid()); in accessChainStore()
893 value = cast(value, valueType, {}, accessChain.typeSpec, nullptr); in accessChainStore()
895 if (!accessChain.swizzles.empty()) in accessChainStore()
899 spirv::WriteLoad(mBuilder.getSpirvCurrentFunctionBlock(), accessChain.preSwizzleTypeId, in accessChainStore()
916 for (uint32_t component = 0; component < accessChain.swizzledVectorComponentCount; in accessChainStore()
922 for (uint32_t dstComponent : accessChain.swizzles) in accessChainStore()
925 spirv::LiteralInteger(accessChain.swizzledVectorComponentCount + srcComponent); in accessChainStore()
933 accessChain.preSwizzleTypeId, result, loadResult, value, in accessChainStore()
977 const AccessChain &accessChain = data->accessChain; in getAccessChainTypeId() local
979 if (accessChain.postDynamicComponentTypeId.valid()) in getAccessChainTypeId()
981 return accessChain.postDynamicComponentTypeId; in getAccessChainTypeId()
983 if (accessChain.postSwizzleTypeId.valid()) in getAccessChainTypeId()
985 return accessChain.postSwizzleTypeId; in getAccessChainTypeId()
987 ASSERT(accessChain.preSwizzleTypeId.valid()); in getAccessChainTypeId()
988 return accessChain.preSwizzleTypeId; in getAccessChainTypeId()
1719 *typeId = mNodeData.back().accessChain.baseTypeId; in endShortCircuit()
1788 (param.accessChain.storageClass == spv::StorageClassFunction && in createFunctionCall()
4449 mBuilder.getTypeData(node->getType(), mNodeData.back().accessChain.typeSpec).id; in visitSwizzle()
4514 mBuilder.getTypeData(node->getType(), mNodeData.back().accessChain.typeSpec).id; in visitBinary()
4534 resultTypeSpec = mNodeData[mNodeData.size() - 2].accessChain.typeSpec; in visitBinary()