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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 29 17:13:18 PDT 2019


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

--- Comment #5 from Myles C. Maxfield <mmaxfield at apple.com> ---
Whoops, the above comment has some typos in it. Here's a corrected one:

RWStructuredBuffer<float> buffer1 : register(u0);
RWStructuredBuffer<float> buffer2 : register(u1);

[numthreads(1, 1, 1)]
void main()
{
        unsigned int u = 0x00FFFFFF;
        buffer2[0] = firstbitlow(u);
        u = 0x0FFFFFFF;
        buffer2[1] = firstbitlow(u);
        u = 0xFFFFFFFF;
        buffer2[2] = firstbitlow(u);
        u = 0xFFFFFFF0;
        buffer2[3] = firstbitlow(u);
        u = 0xFFFFFF00;
        buffer2[4] = firstbitlow(u);

        int i = 0x00FFFFFF;
        buffer2[5] = firstbitlow(i);
        i = 0x0FFFFFFF;
        buffer2[6] = firstbitlow(i);
        i = 0xFFFFFFFF;
        buffer2[7] = firstbitlow(i);
        i = 0xFFFFFFF0;
        buffer2[8] = firstbitlow(i);
        i = 0xFFFFFF00;
        buffer2[9] = firstbitlow(i);

        u = 0x00FFFFFF;
        buffer2[10] = firstbithigh(u);
        u = 0x0FFFFFFF;
        buffer2[11] = firstbithigh(u);
        u = 0xFFFFFFFF;
        buffer2[12] = firstbithigh(u);
        u = 0xFFFFFFF0;
        buffer2[13] = firstbithigh(u);
        u = 0xFFFFFF00;
        buffer2[14] = firstbithigh(u);

        i = 0x00FFFFFF;
        buffer2[15] = firstbithigh(i);
        i = 0x0FFFFFFF;
        buffer2[16] = firstbithigh(i);
        i = 0xFFFFFFFF;
        buffer2[17] = firstbithigh(i);
        i = 0xFFFFFFF0;
        buffer2[18] = firstbithigh(i);
        i = 0xFFFFFF00;
        buffer2[19] = firstbithigh(i);

        i = 0xFFFFFFFF;
        buffer2[20] = i;
}

0: 0
1: 0
2: 0
3: 4
4: 8
5: 0
6: 0
7: 0
8: 4
9: 8
10: 23
11: 27
12: 31
13: 31
14: 31
15: 23
16: 27
17: 4.29497e+09
18: 3
19: 7
20: -1

-- 
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/20190730/44bf99ae/attachment-0001.html>


More information about the webkit-unassigned mailing list