forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake-interp-vec-errors.hlsl
More file actions
33 lines (24 loc) · 1.08 KB
/
make-interp-vec-errors.hlsl
File metadata and controls
33 lines (24 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// RUN: %dxc -I %hlsl_headers -T lib_6_9 %s -verify
#include <dx/linalg.h>
ByteAddressBuffer Buf;
export float4 Test1(vector<float, 4> Input) {
using namespace dx::linalg;
MatrixRef<DATA_TYPE_UINT16, 4, 4, MATRIX_LAYOUT_MUL_OPTIMAL, true> Matrix = {
Buf, 0, 0};
// expected-error@+3{{no matching function for call to 'MakeInterpretedVector'}}
// expected-note@dx/linalg.h:97{{candidate template ignored: invalid explicitly-specified argument for template parameter 'DT'}}
return Mul<float>(
Matrix, MakeInterpretedVector<2>(Input));
}
enum DataType {
DATA_TYPE_InvalidType = 40
};
export float4 Test2(vector<float, 4> Input) {
using namespace dx::linalg;
MatrixRef<DATA_TYPE_UINT16, 4, 4, MATRIX_LAYOUT_MUL_OPTIMAL, true> Matrix = {
Buf, 0, 0};
// expected-error@+3{{no matching function for call to 'MakeInterpretedVector'}}
// expected-note@dx/linalg.h:97{{candidate template ignored: invalid explicitly-specified argument for template parameter 'DT'}}
return Mul<float>(
Matrix, MakeInterpretedVector<DATA_TYPE_InvalidType>(Input));
}