<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WHLSL] Test standard library"
   href="https://bugs.webkit.org/show_bug.cgi?id=199531#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WHLSL] Test standard library"
   href="https://bugs.webkit.org/show_bug.cgi?id=199531">bug 199531</a>
              from <span class="vcard"><a class="email" href="mailto:mmaxfield@apple.com" title="Myles C. Maxfield <mmaxfield@apple.com>"> <span class="fn">Myles C. Maxfield</span></a>
</span></b>
        <pre>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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>