| 283 | } |
| 284 | |
| 285 | HLSLBaseType NumericToBaseType(NumericType numericType) |
| 286 | { |
| 287 | HLSLBaseType baseType = HLSLBaseType_Unknown; |
| 288 | switch (numericType) { |
| 289 | case NumericType_Float: |
| 290 | baseType = HLSLBaseType_Float; |
| 291 | break; |
| 292 | case NumericType_Half: |
| 293 | baseType = HLSLBaseType_Half; |
| 294 | break; |
| 295 | case NumericType_Double: |
| 296 | baseType = HLSLBaseType_Bool; |
| 297 | break; |
| 298 | |
| 299 | case NumericType_Int: |
| 300 | baseType = HLSLBaseType_Int; |
| 301 | break; |
| 302 | case NumericType_Uint: |
| 303 | baseType = HLSLBaseType_Uint; |
| 304 | break; |
| 305 | case NumericType_Ushort: |
| 306 | baseType = HLSLBaseType_Ushort; |
| 307 | break; |
| 308 | case NumericType_Short: |
| 309 | baseType = HLSLBaseType_Short; |
| 310 | break; |
| 311 | case NumericType_Ulong: |
| 312 | baseType = HLSLBaseType_Ulong; |
| 313 | break; |
| 314 | case NumericType_Long: |
| 315 | baseType = HLSLBaseType_Long; |
| 316 | break; |
| 317 | case NumericType_Bool: |
| 318 | baseType = HLSLBaseType_Bool; |
| 319 | break; |
| 320 | |
| 321 | // MSL has 8-bit, but HLSL/Vulkan don't |
| 322 | //case NumericType_Uint8: baseType = HLSLBaseType_Uint8; break; |
| 323 | //case NumericType_Int8: baseType = HLSLBaseType_Int8; break; |
| 324 | |
| 325 | default: |
| 326 | break; |
| 327 | } |
| 328 | return baseType; |
| 329 | } |
| 330 | |
| 331 | HLSLBaseType GetScalarType(HLSLBaseType type) |
| 332 | { |
no outgoing calls
no test coverage detected