1
1
#--- source.hlsl
2
- StructuredBuffer<double4 > X : register(t0);
3
- StructuredBuffer<double4 > Y : register(t1);
2
+ StructuredBuffer<double > X : register(t0);
3
+ StructuredBuffer<double > Y : register(t1);
4
4
5
5
RWStructuredBuffer<double> Out : register(u2);
6
6
7
7
8
8
[numthreads(1,1,1)]
9
9
void main() {
10
- Out[0] = dot(X[0].x , Y[0].x );
10
+ Out[0] = dot(X[0], Y[0]);
11
11
Out[1] = dot(double(1.125), double(7.29));
12
12
13
- Out[2] = dot(X[0].y , Y[0].y );
13
+ Out[2] = dot(X[1] , Y[1] );
14
14
Out[3] = dot(double(-2.5), double(3.14));
15
15
16
- Out[4] = dot(X[0].z , Y[0].z );
16
+ Out[4] = dot(X[2] , Y[2] );
17
17
Out[5] = dot(double(-4.75), double(-1.1));
18
18
19
- Out[6] = dot(X[0].w , Y[0].w );
19
+ Out[6] = dot(X[3] , Y[3] );
20
20
Out[7] = dot(double(6.625), double(-3.5));
21
21
}
22
22
//--- pipeline.yaml
@@ -29,11 +29,11 @@ Shaders:
29
29
Buffers:
30
30
- Name: X
31
31
Format: Float64
32
- Stride: 32
32
+ Stride: 8
33
33
Data: [ 1.125, -2.5, -4.75, 6.625 ]
34
34
- Name: Y
35
35
Format: Float64
36
- Stride: 32
36
+ Stride: 8
37
37
Data: [ 7.29, 3.14, -1.1, -3.5 ]
38
38
- Name: Out
39
39
Format: Float64
0 commit comments