| 1 |
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify |
| 2 |
|
| 3 |
// expected-error@+1{{binding type 't' only applies to SRV resources}} |
| 4 |
float f1 : register(t0); |
| 5 |
|
| 6 |
// expected-error@+1 {{binding type 'u' only applies to UAV resources}} |
| 7 |
float f2 : register(u0); |
| 8 |
|
| 9 |
// expected-error@+1{{binding type 'b' only applies to constant buffers. The 'bool constant' binding type is no longer supported}} |
| 10 |
float f3 : register(b9); |
| 11 |
|
| 12 |
// expected-error@+1 {{binding type 's' only applies to sampler state}} |
| 13 |
float f4 : register(s0); |
| 14 |
|
| 15 |
// expected-error@+1{{binding type 'i' ignored. The 'integer constant' binding type is no longer supported}} |
| 16 |
float f5 : register(i9); |
| 17 |
|
| 18 |
// expected-error@+1{{binding type 'x' is invalid}} |
| 19 |
float f6 : register(x9); |
| 20 |
|
| 21 |
cbuffer g_cbuffer1 { |
| 22 |
// expected-error@+1{{binding type 'c' ignored in buffer declaration. Did you mean 'packoffset'?}} |
| 23 |
float f7 : register(c2); |
| 24 |
}; |
| 25 |
|
| 26 |
tbuffer g_tbuffer1 { |
| 27 |
// expected-error@+1{{binding type 'c' ignored in buffer declaration. Did you mean 'packoffset'?}} |
| 28 |
float f8 : register(c2); |
| 29 |
}; |
| 30 |
|
| 31 |
cbuffer g_cbuffer2 { |
| 32 |
// expected-error@+1{{binding type 'b' only applies to constant buffer resources}} |
| 33 |
float f9 : register(b2); |
| 34 |
}; |
| 35 |
|
| 36 |
tbuffer g_tbuffer2 { |
| 37 |
// expected-error@+1{{binding type 'i' ignored. The 'integer constant' binding type is no longer supported}} |
| 38 |
float f10 : register(i2); |
| 39 |
}; |
| 40 |
|
| 41 |
// expected-error@+1{{binding type 'c' only applies to numeric variables in the global scope}} |
| 42 |
RWBuffer<float> f11 : register(c3); |