<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - bitfieldExtract is marked as a built-in function on OpenGL ES 3.0, but was added in OpenGL ES 3.1"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=101666">101666</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>bitfieldExtract is marked as a built-in function on OpenGL ES 3.0, but was added in OpenGL ES 3.1
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>17.1
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>glsl-compiler
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ds84182@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In the Ubershaders Dolphin PR a bitfieldExtract function is defined since the
context that Dolphin uses on Android is an OpenGL ES 3.0 context.

During shader compilation, Mesa throws an error when encountering
bitfieldExtract, even though bitfieldExtract is not defined in OpenGL ES 3.0.

Relevant Khronos reference page here:
<a href="https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/bitfieldExtract.xhtml">https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/bitfieldExtract.xhtml</a>

To replicate this bug, define bitfieldExtract in an OpenGL ES 3.0 context. The
actual implementation shouldn't matter, but just to be safe, heres the
implementation used inside of Dolphin:

uint bitfieldExtract(uint val, int off, int size) {
    uint mask = uint((1 << size) - 1);
    return uint(val >> off) & mask;
}</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>