https://bugs.freedesktop.org/show_bug.cgi?id=101666

            Bug ID: 101666
           Summary: bitfieldExtract is marked as a built-in function on
                    OpenGL ES 3.0, but was added in OpenGL ES 3.1
           Product: Mesa
           Version: 17.1
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: glsl-compiler
          Assignee: mesa-dev@lists.freedesktop.org
          Reporter: ds84...@gmail.com
        QA Contact: intel-3d-b...@lists.freedesktop.org

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:
https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/bitfieldExtract.xhtml

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;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to