diff options
28 files changed, 290 insertions, 123 deletions
diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs index 9ac3f4e1ad4..6382897efb3 100644 --- a/components/script/dom/webglprogram.rs +++ b/components/script/dom/webglprogram.rs @@ -24,6 +24,7 @@ pub struct WebGLProgram { webgl_object: WebGLObject, id: WebGLProgramId, is_deleted: Cell<bool>, + link_called: Cell<bool>, linked: Cell<bool>, fragment_shader: MutNullableHeap<JS<WebGLShader>>, vertex_shader: MutNullableHeap<JS<WebGLShader>>, @@ -39,6 +40,7 @@ impl WebGLProgram { webgl_object: WebGLObject::new_inherited(), id: id, is_deleted: Cell::new(false), + link_called: Cell::new(false), linked: Cell::new(false), fragment_shader: Default::default(), vertex_shader: Default::default(), @@ -91,27 +93,38 @@ impl WebGLProgram { self.is_deleted.get() } + pub fn is_linked(&self) -> bool { + self.linked.get() + } + /// glLinkProgram - pub fn link(&self) { + pub fn link(&self) -> WebGLResult<()> { + if self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } self.linked.set(false); + self.link_called.set(true); match self.fragment_shader.get() { Some(ref shader) if shader.successfully_compiled() => {}, - _ => return, + _ => return Ok(()), // callers use gl.LINK_STATUS to check link errors } match self.vertex_shader.get() { Some(ref shader) if shader.successfully_compiled() => {}, - _ => return, + _ => return Ok(()), // callers use gl.LINK_STATUS to check link errors } self.linked.set(true); - self.renderer.send(CanvasMsg::WebGL(WebGLCommand::LinkProgram(self.id))).unwrap(); + Ok(()) } /// glUseProgram pub fn use_program(&self) -> WebGLResult<()> { + if self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } if !self.linked.get() { return Err(WebGLError::InvalidOperation); } @@ -120,8 +133,20 @@ impl WebGLProgram { Ok(()) } + /// glValidateProgram + pub fn validate(&self) -> WebGLResult<()> { + if self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } + self.renderer.send(CanvasMsg::WebGL(WebGLCommand::ValidateProgram(self.id))).unwrap(); + Ok(()) + } + /// glAttachShader pub fn attach_shader(&self, shader: &WebGLShader) -> WebGLResult<()> { + if self.is_deleted() || shader.is_deleted() { + return Err(WebGLError::InvalidOperation); + } let shader_slot = match shader.gl_type() { constants::FRAGMENT_SHADER => &self.fragment_shader, constants::VERTEX_SHADER => &self.vertex_shader, @@ -147,6 +172,9 @@ impl WebGLProgram { /// glDetachShader pub fn detach_shader(&self, shader: &WebGLShader) -> WebGLResult<()> { + if self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } let shader_slot = match shader.gl_type() { constants::FRAGMENT_SHADER => &self.fragment_shader, constants::VERTEX_SHADER => &self.vertex_shader, @@ -174,6 +202,9 @@ impl WebGLProgram { /// glBindAttribLocation pub fn bind_attrib_location(&self, index: u32, name: DOMString) -> WebGLResult<()> { + if self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } if name.len() > MAX_UNIFORM_AND_ATTRIBUTE_LEN { return Err(WebGLError::InvalidValue); } @@ -190,6 +221,9 @@ impl WebGLProgram { } pub fn get_active_uniform(&self, index: u32) -> WebGLResult<Root<WebGLActiveInfo>> { + if self.is_deleted() { + return Err(WebGLError::InvalidValue); + } let (sender, receiver) = ipc::channel().unwrap(); self.renderer .send(CanvasMsg::WebGL(WebGLCommand::GetActiveUniform(self.id, index, sender))) @@ -201,6 +235,9 @@ impl WebGLProgram { /// glGetActiveAttrib pub fn get_active_attrib(&self, index: u32) -> WebGLResult<Root<WebGLActiveInfo>> { + if self.is_deleted() { + return Err(WebGLError::InvalidValue); + } let (sender, receiver) = ipc::channel().unwrap(); self.renderer .send(CanvasMsg::WebGL(WebGLCommand::GetActiveAttrib(self.id, index, sender))) @@ -212,6 +249,9 @@ impl WebGLProgram { /// glGetAttribLocation pub fn get_attrib_location(&self, name: DOMString) -> WebGLResult<Option<i32>> { + if !self.is_linked() || self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } if name.len() > MAX_UNIFORM_AND_ATTRIBUTE_LEN { return Err(WebGLError::InvalidValue); } @@ -234,6 +274,9 @@ impl WebGLProgram { /// glGetUniformLocation pub fn get_uniform_location(&self, name: DOMString) -> WebGLResult<Option<i32>> { + if !self.is_linked() || self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } if name.len() > MAX_UNIFORM_AND_ATTRIBUTE_LEN { return Err(WebGLError::InvalidValue); } @@ -250,6 +293,25 @@ impl WebGLProgram { Ok(receiver.recv().unwrap()) } + /// glGetProgramInfoLog + pub fn get_info_log(&self) -> WebGLResult<String> { + if self.is_deleted() { + return Err(WebGLError::InvalidOperation); + } + if self.link_called.get() { + let shaders_compiled = match (self.fragment_shader.get(), self.vertex_shader.get()) { + (Some(fs), Some(vs)) => fs.successfully_compiled() && vs.successfully_compiled(), + _ => false + }; + if !shaders_compiled { + return Ok("One or more shaders failed to compile".to_string()); + } + } + let (sender, receiver) = ipc::channel().unwrap(); + self.renderer.send(CanvasMsg::WebGL(WebGLCommand::GetProgramInfoLog(self.id, sender))).unwrap(); + Ok(receiver.recv().unwrap()) + } + /// glGetProgramParameter pub fn parameter(&self, param_id: u32) -> WebGLResult<WebGLParameter> { let (sender, receiver) = ipc::channel().unwrap(); diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index d1342190f73..b69f11146fd 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1281,15 +1281,36 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { return self.webgl_error(InvalidOperation); } - if count <= 0 { - return self.webgl_error(InvalidOperation); + if count < 0 { + return self.webgl_error(InvalidValue); } if offset < 0 { return self.webgl_error(InvalidValue); } - if self.current_program.get().is_none() || self.bound_buffer_element_array.get().is_none() { + if self.current_program.get().is_none() { + // From the WebGL spec + // + // If the CURRENT_PROGRAM is null, an INVALID_OPERATION error will be generated. + // WebGL performs additional error checking beyond that specified + // in OpenGL ES 2.0 during calls to drawArrays and drawElements. + // + return self.webgl_error(InvalidOperation); + } + + if let Some(array_buffer) = self.bound_buffer_element_array.get() { + // WebGL Spec: check buffer overflows, must be a valid multiple of the size. + let val = offset as u64 + (count as u64 * type_size as u64); + if val > array_buffer.capacity() as u64 { + return self.webgl_error(InvalidOperation); + } + } else { + // From the WebGL spec + // + // a non-null WebGLBuffer must be bound to the ELEMENT_ARRAY_BUFFER binding point + // or an INVALID_OPERATION error will be generated. + // return self.webgl_error(InvalidOperation); } @@ -1323,25 +1344,68 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 + fn DisableVertexAttribArray(&self, attrib_id: u32) { + if attrib_id > self.limits.max_vertex_attribs { + return self.webgl_error(InvalidValue); + } + + self.ipc_renderer + .send(CanvasMsg::WebGL(WebGLCommand::DisableVertexAttribArray(attrib_id))) + .unwrap() + } + + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 fn GetActiveUniform(&self, program: Option<&WebGLProgram>, index: u32) -> Option<Root<WebGLActiveInfo>> { - program.and_then(|p| match p.get_active_uniform(index) { + let program = match program { + Some(program) => program, + None => { + // Reasons to generate InvalidValue error + // From the GLES 2.0 spec + // + // "INVALID_VALUE is generated if index is greater than or equal + // to the number of active uniform variables in program" + // + // A null program has no uniforms so any index is always greater than the active uniforms + // WebGl conformance expects error with null programs. Check tests in get-active-test.html + self.webgl_error(InvalidValue); + return None; + } + }; + + match program.get_active_uniform(index) { Ok(ret) => Some(ret), - Err(error) => { - self.webgl_error(error); - None - }, - }) + Err(e) => { + self.webgl_error(e); + return None; + } + } } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 fn GetActiveAttrib(&self, program: Option<&WebGLProgram>, index: u32) -> Option<Root<WebGLActiveInfo>> { - program.and_then(|p| match p.get_active_attrib(index) { + let program = match program { + Some(program) => program, + None => { + // Reasons to generate InvalidValue error + // From the GLES 2.0 spec + // + // "INVALID_VALUE is generated if index is greater than or equal + // to the number of active attribute variables in program" + // + // A null program has no attributes so any index is always greater than the active uniforms + // WebGl conformance expects error with null programs. Check tests in get-active-test.html + self.webgl_error(InvalidValue); + return None; + } + }; + + match program.get_active_attrib(index) { Ok(ret) => Some(ret), - Err(error) => { - self.webgl_error(error); - None - }, - }) + Err(e) => { + self.webgl_error(e); + return None; + } + } } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 @@ -1354,6 +1418,22 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 + fn GetProgramInfoLog(&self, program: Option<&WebGLProgram>) -> Option<DOMString> { + if let Some(program) = program { + match program.get_info_log() { + Ok(value) => Some(DOMString::from(value)), + Err(e) => { + self.webgl_error(e); + None + } + } + } else { + self.webgl_error(WebGLError::InvalidValue); + None + } + } + + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 fn GetProgramParameter(&self, _: *mut JSContext, program: Option<&WebGLProgram>, param_id: u32) -> JSVal { if let Some(program) = program { match handle_potential_webgl_error!(self, program.parameter(param_id), WebGLParameter::Invalid) { @@ -1699,7 +1779,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 fn LinkProgram(&self, program: Option<&WebGLProgram>) { if let Some(program) = program { - program.link() + if let Err(e) = program.link() { + self.webgl_error(e); + } } } @@ -1940,6 +2022,15 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } } + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 + fn ValidateProgram(&self, program: Option<&WebGLProgram>) { + if let Some(program) = program { + if let Err(e) = program.validate() { + self.webgl_error(e); + } + } + } + // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 fn VertexAttrib1f(&self, indx: u32, x: f32) { self.vertex_attrib(indx, x, 0f32, 0f32, 1f32) @@ -2016,13 +2107,38 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { return self.webgl_error(InvalidValue); } - if let constants::FLOAT = data_type { - let msg = CanvasMsg::WebGL( - WebGLCommand::VertexAttribPointer2f(attrib_id, size, normalized, stride, offset as u32)); - self.ipc_renderer.send(msg).unwrap() - } else { - panic!("VertexAttribPointer: Data Type not supported") + // GLES spec: If offset or stride is negative, an INVALID_VALUE error will be generated + // WebGL spec: the maximum supported stride is 255 + if stride < 0 || stride > 255 || offset < 0 { + return self.webgl_error(InvalidValue); + } + if size < 1 || size > 4 { + return self.webgl_error(InvalidValue); + } + if self.bound_buffer_array.get().is_none() { + return self.webgl_error(InvalidOperation); + } + + // stride and offset must be multiple of data_type + match data_type { + constants::BYTE | constants::UNSIGNED_BYTE => {}, + constants::SHORT | constants::UNSIGNED_SHORT => { + if offset % 2 > 0 || stride % 2 > 0 { + return self.webgl_error(InvalidOperation); + } + }, + constants::FLOAT => { + if offset % 4 > 0 || stride % 4 > 0 { + return self.webgl_error(InvalidOperation); + } + }, + _ => return self.webgl_error(InvalidEnum), + } + + let msg = CanvasMsg::WebGL( + WebGLCommand::VertexAttribPointer(attrib_id, size, data_type, normalized, stride, offset as u32)); + self.ipc_renderer.send(msg).unwrap() } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4 diff --git a/components/script/dom/webidls/WebGLRenderingContext.webidl b/components/script/dom/webidls/WebGLRenderingContext.webidl index 06727b3a536..19e5f029168 100644 --- a/components/script/dom/webidls/WebGLRenderingContext.webidl +++ b/components/script/dom/webidls/WebGLRenderingContext.webidl @@ -552,7 +552,7 @@ interface WebGLRenderingContextBase void depthRange(GLclampf zNear, GLclampf zFar); void detachShader(WebGLProgram? program, WebGLShader? shader); void disable(GLenum cap); - //void disableVertexAttribArray(GLuint index); + void disableVertexAttribArray(GLuint index); void drawArrays(GLenum mode, GLint first, GLsizei count); void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); @@ -583,7 +583,7 @@ interface WebGLRenderingContextBase //any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, // GLenum pname); any getProgramParameter(WebGLProgram? program, GLenum pname); - //DOMString? getProgramInfoLog(WebGLProgram? program); + DOMString? getProgramInfoLog(WebGLProgram? program); //any getRenderbufferParameter(GLenum target, GLenum pname); any getShaderParameter(WebGLShader? shader, GLenum pname); //WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype); @@ -704,7 +704,7 @@ interface WebGLRenderingContextBase // sequence<GLfloat> value); void useProgram(WebGLProgram? program); - //void validateProgram(WebGLProgram? program); + void validateProgram(WebGLProgram? program); // FIXME(dmarcos) // The code generator doesn't handle Float32Array so we're using 'object' diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 21d118f74f5..db11cbc905a 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -70,8 +70,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "angle" -version = "0.1.1" -source = "git+https://github.com/servo/angle?branch=servo#f19aefbf3db45952480e7255cdf844db827c0bcb" +version = "0.1.2" +source = "git+https://github.com/servo/angle?branch=servo#99128001400771ee9c8a74dcf54cf6fe11b1e532" dependencies = [ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1986,7 +1986,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "script" version = "0.0.1" dependencies = [ - "angle 0.1.1 (git+https://github.com/servo/angle?branch=servo)", + "angle 0.1.2 (git+https://github.com/servo/angle?branch=servo)", "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "audio-video-metadata 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2825,7 +2825,7 @@ dependencies = [ "checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" "checksum alloc-no-stdlib 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b21f6ad9c9957eb5d70c3dee16d31c092b3cab339628f821766b05e6833d72b8" "checksum android_glue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e2b80445d331077679dfc6f3014f3e9ab7083e588423d35041d3fc017198189" -"checksum angle 0.1.1 (git+https://github.com/servo/angle?branch=servo)" = "<none>" +"checksum angle 0.1.2 (git+https://github.com/servo/angle?branch=servo)" = "<none>" "checksum app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "636ee56f12e31dbc11dc0a1ac6004f08b04e6e6595963716fc8130e90d4e04cf" "checksum arrayvec 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "80a137392e2e92ce7387c063d98a11f0d47115426c5f8759657af3c7b385c860" "checksum aster 0.27.0 (registry+https://github.com/rust-lang/crates.io-index)" = "258989846dd255a1e0eeef92d425d345477c9999433cecc9f0879f4549d5e5c9" diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index f0ad1fc6f9a..f2ecc4c327b 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -43,8 +43,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "angle" -version = "0.1.1" -source = "git+https://github.com/servo/angle?branch=servo#f19aefbf3db45952480e7255cdf844db827c0bcb" +version = "0.1.2" +source = "git+https://github.com/servo/angle?branch=servo#99128001400771ee9c8a74dcf54cf6fe11b1e532" dependencies = [ "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1837,7 +1837,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "script" version = "0.0.1" dependencies = [ - "angle 0.1.1 (git+https://github.com/servo/angle?branch=servo)", + "angle 0.1.2 (git+https://github.com/servo/angle?branch=servo)", "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "audio-video-metadata 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2685,7 +2685,7 @@ dependencies = [ "checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" "checksum alloc-no-stdlib 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b21f6ad9c9957eb5d70c3dee16d31c092b3cab339628f821766b05e6833d72b8" "checksum android_glue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e2b80445d331077679dfc6f3014f3e9ab7083e588423d35041d3fc017198189" -"checksum angle 0.1.1 (git+https://github.com/servo/angle?branch=servo)" = "<none>" +"checksum angle 0.1.2 (git+https://github.com/servo/angle?branch=servo)" = "<none>" "checksum app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "636ee56f12e31dbc11dc0a1ac6004f08b04e6e6595963716fc8130e90d4e04cf" "checksum arrayvec 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "80a137392e2e92ce7387c063d98a11f0d47115426c5f8759657af3c7b385c860" "checksum aster 0.27.0 (registry+https://github.com/rust-lang/crates.io-index)" = "258989846dd255a1e0eeef92d425d345477c9999433cecc9f0879f4549d5e5c9" diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini index 93580149f5f..940ca3b5e98 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html.ini @@ -1,9 +1,33 @@ [gl-vertex-attrib-zero-issues.html] type: testharness - expected: ERROR - [WebGL test #3: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + expected: TIMEOUT + [WebGL test #5: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] expected: FAIL - [WebGL test #4: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #7: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #11: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #13: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #17: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #19: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #23: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #25: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #29: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #31: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] expected: FAIL diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html.ini deleted file mode 100644 index b263af3b8a9..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[gl-vertexattribpointer.html] - type: testharness - expected: CRASH diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html.ini deleted file mode 100644 index 9a2db0486a9..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[index-validation-with-resized-buffer.html] - type: testharness - expected: CRASH diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini index 6b265933f0c..4155f944273 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/buffers/index-validation.html.ini @@ -1,9 +1,11 @@ [index-validation.html] type: testharness - expected: ERROR [WebGL test #0: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Threw exception TypeError: gl.checkFramebufferStatus is not a function] expected: FAIL - [WebGL test #4: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #9: getError expected: INVALID_OPERATION. Was NO_ERROR : ] + expected: FAIL + + [WebGL test #12: getError expected: INVALID_OPERATION. Was NO_ERROR : ] expected: FAIL diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html.ini index f56805c97f3..88faa3358a0 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html.ini @@ -1,8 +1,6 @@ [object-deletion-behaviour.html] type: testharness - expected: - if os == "linux": TIMEOUT - if not debug and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64) and (backend == "webrender"): ERROR + expected: ERROR [WebGL test #9: gl.isShader(vertexShader) should be true. Threw exception TypeError: gl.isShader is not a function] expected: FAIL diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html.ini deleted file mode 100644 index c8b29247a82..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[webGLArrays.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html.ini index 36a75e61716..7ac4c5d523c 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html.ini @@ -1,3 +1,5 @@ [drawArrays.html] type: testharness - expected: TIMEOUT + [WebGL test #0: testDrawElementsVBO] + expected: FAIL + diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html.ini index 9975460a407..7eaba400214 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html.ini @@ -1,3 +1,5 @@ [drawArraysOutOfBounds.html] type: testharness - expected: TIMEOUT + [WebGL test #0: testDrawArraysEmpty] + expected: FAIL + diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html.ini deleted file mode 100644 index 08c08dcb7d3..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[drawElements.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html.ini index 233a654c166..8eef26d287d 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html.ini @@ -1,3 +1,5 @@ [drawElementsBadArgs.html] type: testharness - expected: TIMEOUT + [WebGL test #0: testDrawElementsVBO] + expected: FAIL + diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html.ini deleted file mode 100644 index bfe2adf81cb..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[texImage2DHTML.html] - type: testharness - [WebGL test #0: testTexImage2D] - expected: FAIL - diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html.ini deleted file mode 100644 index a838d05d4ab..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[texSubImage2DHTML.html] - type: testharness - [WebGL test #0: testTexImage2D] - expected: FAIL - diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html.ini index d559b0423b4..628d8ab4a58 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html.ini @@ -1,3 +1,5 @@ [vertexAttrib.html] type: testharness - expected: TIMEOUT + [WebGL test #0: testVertexAttrib] + expected: FAIL + diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html.ini index 2da7f14881a..70592208ddf 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html.ini @@ -1,3 +1,5 @@ [vertexAttribBadArgs.html] type: testharness - expected: TIMEOUT + [WebGL test #0: testVertexAttrib] + expected: FAIL + diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html.ini deleted file mode 100644 index 56cfe58509a..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[vertexAttribPointer.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html.ini deleted file mode 100644 index d280ac50cda..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[vertexAttribPointerBadArgs.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html.ini deleted file mode 100644 index b13667be6ec..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[arrayOutOfBounds.html] - type: testharness - [WebGL test #0: testOk] - expected: FAIL - diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini index dcbfd4d5611..328d70f260c 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/get-active-test.html.ini @@ -1,33 +1,14 @@ [get-active-test.html] type: testharness - expected: CRASH - [WebGL test #1: context.getActiveUniform(program, 0).name should be u_modelViewProjMatrix. Threw exception TypeError: context.getActiveUniform is not a function] + [WebGL test #33: context2.getActiveAttrib(program, 0) should be null. Was [object WebGLActiveInfo\].] expected: FAIL - [WebGL test #2: context.getActiveUniform(program, 0).type should be 35676. Threw exception TypeError: context.getActiveUniform is not a function] + [WebGL test #34: getError expected: INVALID_OPERATION. Was NO_ERROR : ] expected: FAIL - [WebGL test #3: context.getActiveUniform(program, 0).size should be 1. Threw exception TypeError: context.getActiveUniform is not a function] + [WebGL test #35: context2.getActiveUniform(program, 0) should be null. Was [object WebGLActiveInfo\].] expected: FAIL - [WebGL test #4: context.getActiveUniform(program, 1) should be null. Threw exception TypeError: context.getActiveUniform is not a function] - expected: FAIL - - [WebGL test #5: getError expected: INVALID_VALUE. Was NO_ERROR : ] - expected: FAIL - - [WebGL test #6: context.getActiveUniform(program, -1) should be null. Threw exception TypeError: context.getActiveUniform is not a function] - expected: FAIL - - [WebGL test #7: getError expected: INVALID_VALUE. Was NO_ERROR : ] - expected: FAIL - - [WebGL test #8: context.getActiveUniform(null, 0) should be null. Threw exception TypeError: context.getActiveUniform is not a function] - expected: FAIL - - [WebGL test #9: getError expected: INVALID_VALUE. Was NO_ERROR : ] - expected: FAIL - - [WebGL test #10: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #36: getError expected: INVALID_OPERATION. Was NO_ERROR : ] expected: FAIL diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini index d5b7a13216b..27c2d34fffd 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html.ini @@ -1,12 +1,8 @@ [gl-bind-attrib-location-long-names-test.html] type: testharness - expected: ERROR - [WebGL test #4: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] - expected: FAIL - [WebGL test #4: at (0, 0) expected: 0,255,0,255 was 255,255,255,255] expected: FAIL - [WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #8: at (0, 0) expected: 255,0,0,255 was 0,0,0,255] expected: FAIL diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini index b618b447b95..130c279aeb0 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html.ini @@ -1,12 +1,8 @@ [gl-bind-attrib-location-test.html] type: testharness - expected: ERROR - [WebGL test #6: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] - expected: FAIL - [WebGL test #7: at (20, 15) expected: 0,255,0,255 was 0,0,0,255] expected: FAIL - [WebGL test #9: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #13: at (20, 15) expected: 255,0,0,255 was 0,0,0,255] expected: FAIL diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html.ini index 73287c519b5..6c9a578340d 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html.ini @@ -1,3 +1,24 @@ [draw-elements-out-of-bounds.html] type: testharness - expected: TIMEOUT + expected: ERROR + [WebGL test #19: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: gl.drawElements(gl.TRIANGLES, 0, gl.UNSIGNED_BYTE, 4)] + expected: FAIL + + [WebGL test #25: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_BYTE, 0)] + expected: FAIL + + [WebGL test #31: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawElements(gl.TRIANGLES, 12, gl.UNSIGNED_SHORT, 0)] + expected: FAIL + + [WebGL test #32: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawElements(gl.TRIANGLES, 15, gl.UNSIGNED_SHORT, 0)] + expected: FAIL + + [WebGL test #33: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawElements(gl.TRIANGLES, 18, gl.UNSIGNED_SHORT, 0)] + expected: FAIL + + [WebGL test #34: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 30)] + expected: FAIL + + [WebGL test #43: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + expected: FAIL + diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html.ini deleted file mode 100644 index e8902ddddc5..00000000000 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[more-than-65536-indices.html] - type: testharness - expected: CRASH diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html.ini index 6f881548cf2..34d78404323 100644 --- a/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html.ini +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html.ini @@ -1,8 +1,5 @@ [point-no-attributes.html] type: testharness - [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] - expected: FAIL - [WebGL test #1: at (0, 0) expected: 0,255,0,255 was 0,0,0,0] expected: FAIL |