| 1330 | BaseTypeDescription baseTypeDescriptions[HLSLBaseType_Count]; |
| 1331 | |
| 1332 | void RegisterMatrix(HLSLBaseType type, uint32_t typeOffset, NumericType numericType, int binaryOpRank, const char* typeName, uint32_t dim1, uint32_t dim2) |
| 1333 | { |
| 1334 | char buf[32]; |
| 1335 | snprintf(buf, sizeof(buf), "%s%dx%d", typeName, dim1, dim2); |
| 1336 | const char* name = gStringPool.AddString(buf); |
| 1337 | |
| 1338 | HLSLBaseType baseType = (HLSLBaseType)(type + typeOffset); |
| 1339 | |
| 1340 | BaseTypeDescription& desc = baseTypeDescriptions[baseType]; |
| 1341 | desc.typeName = name; |
| 1342 | desc.typeNameMetal = name; |
| 1343 | |
| 1344 | desc.baseType = baseType; |
| 1345 | desc.coreType = CoreType_Matrix; |
| 1346 | desc.dimensionType = DimensionType(DimensionType_Matrix2x2 + (dim2 - 2)); |
| 1347 | desc.numericType = numericType; |
| 1348 | |
| 1349 | desc.numDimensions = 2; |
| 1350 | desc.numComponents = dim1; |
| 1351 | desc.height = dim2; |
| 1352 | desc.binaryOpRank = binaryOpRank; |
| 1353 | } |
| 1354 | |
| 1355 | void RegisterVector(HLSLBaseType type, uint32_t typeOffset, NumericType numericType, int binaryOpRank, const char* typeName, uint32_t dim) |
| 1356 | { |
no test coverage detected