Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor shader source classes, in order to work around a Firefox bug. #2214

Merged
merged 8 commits into from
Oct 23, 2014

Conversation

shunter
Copy link
Contributor

@shunter shunter commented Oct 22, 2014

The Firefox bug prevents shaders from compiling with the CORDIC algorithm, so we detect Firefox and fall back to the original algorithm. Issue #2197.

The overall goal of the refactoring is to allow #defines to affect built-in functions, which was not possible before. In order to do this, we need the #defines to appear at the top of the source, so I've merged the procedural shader generation previously done in ShaderProgram with the generation done in createShaderSource.

  • createShaderSource (private) is removed and replaced by ShaderSource. ShaderSource now manages an array of #defines, concating source shaders, and automatically including built-in functions, keeping everything in the correct order.
  • ShaderCache (and by extension Context.createShaderProgram and Context.replaceShaderProgram) now accept either ShaderSource objects, or a single string, for vertex and fragment shaders.
  • ShaderProgram constructor (private) now takes an options object. It also exposes the vertex and fragment shaders as ShaderSource objects instead of strings. External code can still clone the ShaderSources and then screw around with the implementation to make new shaders procedurally, as OIT does.

The Firefox bug prevents shaders from compiling with the CORDIC algorithm, so we detect Firefox and fall back to the original algorithm.  Issue #2197.

The overall goal of the refactoring is to allow `#defines` to affect built-in functions, which was not possible before.  In order to do this, we need the `#defines` to appear at the top of the source, so I've merged the procedural shader generation previously done in `ShaderProgram` with the generation done in `createShaderSource`.

* `createShaderSource` (private) is removed and replaced by `ShaderSource`. `ShaderSource` now manages an array of `#defines`, concating source shaders, and automatically including built-in functions, keeping everything in the correct order.
* `ShaderCache` (and by extension `Context.createShaderProgram` and `Context.replaceShaderProgram`) now accept either `ShaderSource` objects, or a single string, for vertex and fragment shaders.
* `ShaderProgram` constructor (private) now takes an options object.  It also exposes the vertex and fragment shaders as `ShaderSource` objects instead of strings.  External code can still clone the `ShaderSources` and then screw around with the implementation to make new shaders procedurally, as `OIT` does.
* @param {Boolean} isFragmentShader True if this shader will be a fragment shader.
* @returns {String} The combined shader string.
*/
ShaderSource.prototype.getCombinedShader = function(isFragmentShader) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit hacky, right? I had no idea what this parameter did when I looked at code calling this function. Why not two separate functions: one for vertex shaders and another for fragment shaders?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split into two functions.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 22, 2014

Thanks @shunter. Just those comments. FF 33 on Windows looks good. There's a few test failures (below) but I would not worry given this version of ANGLE.


Jasmine 1.3.1 revision 1354556913finished in 45.439s
No try/catchCategory: Run all but selected:Failing 5 specs
View: 5666 specs summary | 5 failing | 0 skipped
Renderer/ShaderProgram has a struct uniform. (show summary)
RuntimeError: Program failed to link. Link log: Failed to create D3D shaders.
RuntimeError@http://localhost:8080/Source/Core/RuntimeError.js:42:19 createAndLinkProgram@http://localhost:8080/Source/Renderer/ShaderProgram.js:472:1 initialize@http://localhost:8080/Source/Renderer/ShaderProgram.js:647:23 .allUniforms.get@http://localhost:8080/Source/Renderer/ShaderProgram.js:410:17 @http://localhost:8080/Specs/Renderer/ShaderProgramSpec.js:246:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Spec.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2360:5 jasmine.Spec.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2387:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.WaitsForBlock.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2588:5 jasmine.WaitsForBlock.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2602:7
Renderer/ShaderProgram sets a struct uniform. (show summary)
RuntimeError: Program failed to link. Link log: Failed to create D3D shaders.
RuntimeError@http://localhost:8080/Source/Core/RuntimeError.js:42:19 createAndLinkProgram@http://localhost:8080/Source/Renderer/ShaderProgram.js:472:1 initialize@http://localhost:8080/Source/Renderer/ShaderProgram.js:647:23 .allUniforms.get@http://localhost:8080/Source/Renderer/ShaderProgram.js:410:17 @http://localhost:8080/Specs/Renderer/ShaderProgramSpec.js:386:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Spec.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2360:5 jasmine.Spec.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2387:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Renderer/Texture draws textured blue and red points. (show summary)
Expected { 0 : 0, 1 : 0, 2 : 255, 3 : 255 } to equal [ 255, 0, 0, 255 ].
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/TextureSpec.js:244:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Spec.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2360:5 jasmine.Spec.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2387:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.WaitsForBlock.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2588:5 jasmine.WaitsForBlock.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2602:7
Renderer/Texture can replace a subset of a texture. (show summary)
Expected { 0 : 0, 1 : 0, 2 : 255, 3 : 255 } to equal [ 255, 0, 0, 255 ].
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/TextureSpec.js:320:1 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Spec.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2360:5 jasmine.Spec.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2387:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.WaitsForBlock.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2588:5 jasmine.WaitsForBlock.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2602:7
Expected { 0 : 0, 1 : 255, 2 : 0, 3 : 255 } to equal [ 255, 0, 0, 255 ].
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/TextureSpec.js:333:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Spec.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2360:5 jasmine.Spec.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2387:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.WaitsForBlock.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2588:5 jasmine.WaitsForBlock.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2602:7
Renderer/VertexArrayFacade sub-commits. (show summary)
Expected 8 to equal 24.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:206:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Expected 35040 to equal 35044.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:207:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Expected 1 to equal 3.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:208:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Expected 4 to equal 12.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:211:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Expected 24 to equal 8.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:215:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Expected 35044 to equal 35040.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:216:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Expected 3 to equal 1.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:217:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13
Expected 12 to equal 4.
jasmine.ExpectationResult@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:114:32 jasmine.Matchers.matcherFn_/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1243:29 @http://localhost:8080/Specs/Renderer/VertexArrayFacadeSpec.js:220:9 jasmine.Block.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:1072:7 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Spec.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2386:3 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.start@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2057:3 jasmine.Suite.prototype.execute@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2533:3 jasmine.Suite.prototype.execute</<@http://localhost:8080/Specs/SpecRunner.js:140:13 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2104:7 jasmine.Queue.prototype.next_/onComplete@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2100:13 jasmine.Suite.prototype.finish@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2490:5 jasmine.Suite.prototype.execute/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2534:5 jasmine.Queue.prototype.next_@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2114:9 jasmine.Queue.prototype.next_/onComplete/<@http://localhost:8080/ThirdParty/jasmine-1.3.1/jasmine.js:2094:13

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 23, 2014

I changed the code to not use ShaderSource. The logic for building the shader is fairly simple anyway.

OK

@shunter
Copy link
Contributor Author

shunter commented Oct 23, 2014

I think I've addressed your comments. I merged in master as well. I believe the remaining Firefox test failures are all long-standing issues.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 23, 2014

Very nice, thanks.

Can you update CHANGES.md for the FF fix in master and reply to the forum? https://groups.google.com/forum/#!msg/cesium-dev/-NRjGK1rcdU/ozcB3Ux5CJgJ

pjcozzi added a commit that referenced this pull request Oct 23, 2014
…Crash

Refactor shader source classes, in order to work around a Firefox bug.
@pjcozzi pjcozzi merged commit a200bf8 into master Oct 23, 2014
@pjcozzi pjcozzi deleted the workAroundFirefoxCrash branch October 23, 2014 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants