| 1353 | } |
| 1354 | |
| 1355 | void RegisterVector(HLSLBaseType type, uint32_t typeOffset, NumericType numericType, int binaryOpRank, const char* typeName, uint32_t dim) |
| 1356 | { |
| 1357 | char buf[32]; |
| 1358 | snprintf(buf, sizeof(buf), "%s%d", typeName, dim); |
| 1359 | const char* name = gStringPool.AddString(buf); |
| 1360 | |
| 1361 | HLSLBaseType baseType = (HLSLBaseType)(type + typeOffset); |
| 1362 | |
| 1363 | BaseTypeDescription& desc = baseTypeDescriptions[type + typeOffset]; |
| 1364 | desc.typeName = name; |
| 1365 | desc.typeNameMetal = name; |
| 1366 | |
| 1367 | // 4 types |
| 1368 | desc.baseType = baseType; |
| 1369 | desc.coreType = CoreType_Vector; |
| 1370 | desc.dimensionType = DimensionType(DimensionType_Vector2 + (dim - 2)); |
| 1371 | desc.numericType = numericType; |
| 1372 | |
| 1373 | desc.numDimensions = 1; |
| 1374 | desc.numComponents = dim; |
| 1375 | desc.height = 1; |
| 1376 | desc.binaryOpRank = binaryOpRank; |
| 1377 | } |
| 1378 | |
| 1379 | void RegisterScalar(HLSLBaseType type, uint32_t typeOffset, NumericType numericType, int binaryOpRank, const char* typeName) |
| 1380 | { |
no test coverage detected