Summary: | Uniform count in one WebGL shader program prevents unrelated shader program from drawing | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrea Faulds <ajf> | ||||
Component: | WebGL | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Normal | CC: | dino, jonlee, lauren, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Safari 10 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
If there are one or two other bugs in Radar from me yesterday about the same thing, I apologise. The Apple Bug Report website deauthenticated me no less than twice while trying to report it, then refused to function at all afterwards, and so I've no idea if either bug report there got through. (In reply to Andrea Faulds from comment #2) > If there are one or two other bugs in Radar from me yesterday about the same > thing, I apologise. The Apple Bug Report website deauthenticated me no less > than twice while trying to report it, then refused to function at all > afterwards, and so I've no idea if either bug report there got through. Did the report fail to submit, or were you able to see any bug #'s? If not, the reports probably did not go through. Sorry about that. You can update this bug and we'll see it both here and in the bug cited above. (In reply to Jon Lee from comment #3) > (In reply to Andrea Faulds from comment #2) > > If there are one or two other bugs in Radar from me yesterday about the same > > thing, I apologise. The Apple Bug Report website deauthenticated me no less > > than twice while trying to report it, then refused to function at all > > afterwards, and so I've no idea if either bug report there got through. > > Did the report fail to submit, or were you able to see any bug #'s? If not, > the reports probably did not go through. Sorry about that. > > You can update this bug and we'll see it both here and in the bug cited > above. After being able to log in later, I couldn't see any submitted bug, so I assume both failed to submit. But it doesn't matter, since there's nothing in those bug reports that's missing from this one, I think. My code was actually broken in a way I forgot (I misunderstood some aspect of the OpenGL state machine). It was just luck it “worked” in other browser engines. |
Created attachment 308315 [details] The test case The test case (attached: minimal.html) is a small WebGL application. It has two shader programs with their own vertex and fragment shaders. It uses drawArrays with one piece of geometry and the first shader program, then uses drawArrays with another piece of geometry and the other shader program. In Firefox and Chrome (on macOS), and Microsoft Edge (on Windows 10), both draws succeed. You see a black field with 50 small randomly scattered white squares (the first shader program), and a large red square (the second shader program). In Safari Version 10.1 (12603.1.30.0.34) on macOS Sierra 10.12.4 (16E195) on a MacBook Air (13-inch, Mid 2013), and Safari on iOS 10.3.1 (14E304) on an iPhone 5S (NE433B/A), only the first draw works. You see only a black field with 50 small randomly scattered white squares (the first shader program). There is no large red square (the second shader program). Removing either or both of these two lines from the first shader program's vertex shader will make the second draw work in Safari: uniform vec2 uselessUniform1; uniform float uselessUniform2; That is, the number of uniforms in the first shader program affects whether the /second/ shader program will render successfully. Whether or not the uniforms are actually in use seems to have no effect. The original program, from which this is cut down, actually made use of these uniforms, and had more of them. Whether or not the first shader is rendered (i.e. commenting out its drawArrays call) also has no effect on the second shader not being rendered.