[Webkit-unassigned] [Bug 199531] [WHLSL] Test standard library

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 1 12:13:14 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=199531

--- Comment #7 from Myles C. Maxfield <mmaxfield at apple.com> ---
RWStructuredBuffer<float> buffer1 : register(u0);
RWStructuredBuffer<float> buffer2 : register(u1);

[numthreads(1, 1, 1)]
void main()
{
        int index = 0;
        for (int i = 0; i < 10; ++i) {
                buffer2[index++] = buffer1[i];
                buffer2[index++] = isnan(buffer1[i]) ? 1 : 0;
                buffer2[index++] = isinf(buffer1[i]) ? 1 : 0;
                buffer2[index++] = trunc(buffer1[i]);
                buffer2[index++] = floor(buffer1[i]);
                buffer2[index++] = frac(buffer1[i]);
                buffer2[index++] = ceil(buffer1[i]);
                buffer2[index++] = round(buffer1[i]);
                buffer2[index++] = sqrt(buffer1[i]);
                buffer2[index++] = log(buffer1[i]);
                buffer2[index++] = rcp(buffer1[i]);
                buffer2[index++] = 9999999;
        }
}

"buffer1" is { 5, INFINITY, -INFINITY, NAN, 0.0, -0.0, -3.2, -3.7, 3.2, 3.7 }

Results:
0: 5
1: 0
2: 0
3: 5
4: 5
5: 0
6: 5
7: 5
8: 2.23607
9: 1.60944
10: 0.2
11: 1e+07
12: inf
13: 0
14: 1
15: inf
16: inf
17: -nan(ind)
18: inf
19: inf
20: inf
21: inf
22: 0
23: 1e+07
24: -inf
25: 0
26: 1
27: -inf
28: -inf
29: -nan(ind)
30: -inf
31: -inf
32: -nan(ind)
33: -nan(ind)
34: -0
35: 1e+07
36: -nan(ind)
37: 1
38: 0
39: -nan(ind)
40: -nan(ind)
41: -nan(ind)
42: -nan(ind)
43: -nan(ind)
44: -nan(ind)
45: -nan(ind)
46: -nan(ind)
47: 1e+07
48: 0
49: 0
50: 0
51: 0
52: 0
53: 0
54: 0
55: 0
56: 0
57: -inf
58: inf
59: 1e+07
60: -0
61: 0
62: 0
63: -0
64: -0
65: 0
66: -0
67: -0
68: -0
69: -inf
70: -inf
71: 1e+07
72: -3.2
73: 0
74: 0
75: -3
76: -4
77: 0.8
78: -3
79: -3
80: -nan(ind)
81: -nan(ind)
82: -0.3125
83: 1e+07
84: -3.7
85: 0
86: 0
87: -3
88: -4
89: 0.3
90: -3
91: -4
92: -nan(ind)
93: -nan(ind)
94: -0.27027
95: 1e+07
96: 3.2
97: 0
98: 0
99: 3
100: 3
101: 0.2
102: 4
103: 3
104: 1.78885
105: 1.16315
106: 0.3125
107: 1e+07
108: 3.7
109: 0
110: 0
111: 3
112: 3
113: 0.7
114: 4
115: 4
116: 1.92354
117: 1.30833
118: 0.27027
119: 1e+07

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190801/80be0618/attachment.html>


More information about the webkit-unassigned mailing list