aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaHLSL/Semantics/struct_input.hlsl
blob: 66cab9552d4d9242c361e21a8d248e14fae3a76d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -finclude-default-header -o - %s -verify

struct S {
  float4 f0 : SV_Position;
// expected-error@+2 {{semantic annotations must be present for all parameters of an entry function or patch constant function}}
// expected-note@+1 {{'f1' used here}}
  float4 f1;
};

[shader("pixel")]
// expected-note@+1 {{'s' declared here}}
void main(S s) {
}

[shader("pixel")]
// expected-error@+2 {{semantic annotations must be present for all parameters of an entry function or patch constant function}}
// expected-note@+1 {{'f' declared here}}
void main2(float4 p : SV_POSITION, float4 f)
{ }