Closed
Bug 1432102
Opened 6 years ago
Closed 6 years ago
WebGL shader compilation error on FF / Linux / NVidia Optimus in Intel mode
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1399501
People
(Reporter: charles.fleche, Unassigned)
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
33.35 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20180104101725 Steps to reproduce: Try the example https://codepen.io/charlesfleche/pen/opJQRZ Actual results: On Firefox / Linux / NVidia Optimus in Intel GPU mode, this examples fails during shader compilation: ``` 0:2(12): warning: extension `GL_ARB_gpu_shader5' unsupported in fragment shader 0:10(29): error: sampler arrays indexed with non-constant expressions are forbidden in GLSL 1.30 and later ``` Firefox 57.0.4 (64 bits) OS: Kubuntu 17.10 NVidia drivers: 384.111 GPU: GeForce GTX 960M Expected results: Blue colored shapes should appear. Accessing an array of `sampler2D` with a dynamic index breaks shader compilation. ``` uniform sampler2D textures[2]; void main(void) { // ... for (int i = 0 ; i < 2 ; ++i ) { gl_FragColor += texture2D(textures[i], vUv); } // ... } ``` This is allowed in WebGL 1 (not in WebGL 2 anymore), and works on every OS / browser configuration I've tested (Linux / macOS / Windows / FF / Safari / Chrome) and it does work on FF / Linux / NVidia Optimus in discrete GPU (GTX 960M) mode: neither the warning nor the error appear and the example works fine.
Reporter | ||
Updated•6 years ago
|
Summary: WebGL shader compilation error on FF / Linux / Intel drivers → WebGL shader compilation error on FF / Linux / NVidia Optimus in Intel mode
Updated•6 years ago
|
Whiteboard: [gfx-noted]
Updated•6 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•