[Bug 101666] bitfieldExtract is marked as a built-in function on OpenGL ES 3.0, but was added in OpenGL ES 3.1

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jul 2 13:59:10 UTC 2017


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

--- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> ---
Despite the code looking just fine, I can repro this with a shader_test:

[require]
GL ES >= 3.0
GLSL ES >= 3.00

[vertex shader]
#version 300 es

uint bitfieldExtract(uint val, int off, int size) {
    uint mask = uint((1 << size) - 1);
    return uint(val >> off) & mask;
}

void main() {
  gl_Position = vec4(bitfieldExtract(1u, 2, 3));
}

[fragment shader]
#version 300 es
out vec4 color;
void main() { color = vec4(0,1,0,1); }

[test]
link success


results in

Failed to compile VS: 0:3(6): error: A shader cannot redefine or overload
built-in function `bitfieldExtract' in GLSL ES 3.00
0:9(21): error: no matching function for call to `bitfieldExtract(uint, int,
int)'; candidates are:
0:9(16): error: cannot construct `vec4' from a non-numeric data type

Will require some code reading, because the builtin_functions.cpp signature
seems fine. It must not be getting validated at the right times...

[And to avoid any confusion, this was on SNB, so ES 3.1 wasn't even an option.]

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170702/62e980de/attachment.html>


More information about the intel-3d-bugs mailing list