| 1 |
// RUN: %clang_cc1 -triple spirv-linux-vulkan-vertex -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s -verify -verify-ignore-unexpected=note |
| 2 |
|
| 3 |
// This is almost the same as semantic.explicit-mix-builtin.hlsl, except this |
| 4 |
// time we build a vertex shader. This means the SV_Position semantic is not |
| 5 |
// a BuiltIn anymore, but a Location decorated variable. This means we mix |
| 6 |
// implicit and explicit location assignment. |
| 7 |
struct S1 { |
| 8 |
float4 position : SV_Position; |
| 9 |
[[vk::location(3)]] float4 color : A; |
| 10 |
// expected-error@-1 {{partial explicit stage input location assignment via vk::location(X) unsupported}} |
| 11 |
}; |
| 12 |
|
| 13 |
[shader("vertex")] |
| 14 |
float4 main1(S1 p) : A { |
| 15 |
return p.position + p.color; |
| 16 |
} |