1 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-amplification | FileCheck -match-full-lines %s --check-prefixes=CHECK,AMPLIFICATION 2 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-compute | FileCheck -match-full-lines %s --check-prefixes=CHECK,COMPUTE 3 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-domain | FileCheck -match-full-lines %s --check-prefixes=CHECK,DOMAIN 4 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-geometry | FileCheck -match-full-lines %s --check-prefixes=CHECK,GEOMETRY 5 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-hull | FileCheck -match-full-lines %s --check-prefixes=CHECK,HULL 6 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-library | FileCheck -match-full-lines %s --check-prefixes=CHECK,LIBRARY 7 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-mesh | FileCheck -match-full-lines %s --check-prefixes=CHECK,MESH 8 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-pixel | FileCheck -match-full-lines %s --check-prefixes=CHECK,PIXEL 9 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -triple dxil-pc-shadermodel6.0-vertex | FileCheck -match-full-lines %s --check-prefixes=CHECK,VERTEX 10 11 // CHECK: #define __HLSL_VERSION 2021 12 // CHECK: #define __SHADER_STAGE_AMPLIFICATION 14 13 // CHECK: #define __SHADER_STAGE_COMPUTE 5 14 // CHECK: #define __SHADER_STAGE_DOMAIN 4 15 // CHECK: #define __SHADER_STAGE_GEOMETRY 2 16 // CHECK: #define __SHADER_STAGE_HULL 3 17 // CHECK: #define __SHADER_STAGE_LIBRARY 6 18 // CHECK: #define __SHADER_STAGE_MESH 13 19 // CHECK: #define __SHADER_STAGE_PIXEL 0 20 // CHECK: #define __SHADER_STAGE_VERTEX 1 21 22 // AMPLIFICATION: #define __SHADER_TARGET_STAGE 14 23 // COMPUTE: #define __SHADER_TARGET_STAGE 5 24 // DOMAIN: #define __SHADER_TARGET_STAGE 4 25 // GEOMETRY: #define __SHADER_TARGET_STAGE 2 26 // HULL: #define __SHADER_TARGET_STAGE 3 27 // LIBRARY: #define __SHADER_TARGET_STAGE 6 28 // MESH: #define __SHADER_TARGET_STAGE 13 29 // PIXEL: #define __SHADER_TARGET_STAGE 0 30 // VERTEX: #define __SHADER_TARGET_STAGE 1 31 32 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -std=hlsl2015 | FileCheck -match-full-lines %s --check-prefixes=STD2015 33 // STD2015: #define __HLSL_VERSION 2015 34 35 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -std=hlsl2016 | FileCheck -match-full-lines %s --check-prefixes=STD2016 36 // STD2016: #define __HLSL_VERSION 2016 37 38 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -std=hlsl2017 | FileCheck -match-full-lines %s --check-prefixes=STD2017 39 // STD2017: #define __HLSL_VERSION 2017 40 41 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -std=hlsl2018 | FileCheck -match-full-lines %s --check-prefixes=STD2018 42 // STD2018: #define __HLSL_VERSION 2018 43 44 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -std=hlsl2021 | FileCheck -match-full-lines %s --check-prefixes=STD2021 45 // STD2021: #define __HLSL_VERSION 2021 46 47 // RUN: %clang_cc1 %s -E -dM -o - -x hlsl -std=hlsl202x | FileCheck -match-full-lines %s --check-prefixes=STD202x 48 // STD202x: #define __HLSL_VERSION 2029 49