| 1 |
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -finclude-default-header -o - %s -verify |
| 2 |
|
| 3 |
struct S { |
| 4 |
float4 f0 : SV_Position; |
| 5 |
// expected-error@+2 {{semantic annotations must be present for all parameters of an entry function or patch constant function}} |
| 6 |
// expected-note@+1 {{'f1' used here}} |
| 7 |
float4 f1; |
| 8 |
}; |
| 9 |
|
| 10 |
[shader("pixel")] |
| 11 |
// expected-note@+1 {{'s' declared here}} |
| 12 |
void main(S s) { |
| 13 |
} |
| 14 |
|
| 15 |
[shader("pixel")] |
| 16 |
// expected-error@+2 {{semantic annotations must be present for all parameters of an entry function or patch constant function}} |
| 17 |
// expected-note@+1 {{'f' declared here}} |
| 18 |
void main2(float4 p : SV_POSITION, float4 f) |
| 19 |
{ } |