diff options
16 files changed, 255 insertions, 70 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 6a43031f170..3ab38995e8d 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -13,6 +13,7 @@ use canvas_traits::webgl::DOMToTextureCommand; use canvas_traits::webgl::GLContextAttributes; use canvas_traits::webgl::GLLimits; use canvas_traits::webgl::GlType; +use canvas_traits::webgl::InternalFormatIntVec; use canvas_traits::webgl::ProgramLinkInfo; use canvas_traits::webgl::SwapChainId; use canvas_traits::webgl::TexDataType; @@ -1211,6 +1212,13 @@ impl WebGLImpl { WebGLCommand::RenderbufferStorage(target, format, width, height) => { gl.renderbuffer_storage(target, format, width, height) }, + WebGLCommand::RenderbufferStorageMultisample( + target, + samples, + format, + width, + height, + ) => gl.renderbuffer_storage_multisample(target, samples, format, width, height), WebGLCommand::SampleCoverage(value, invert) => gl.sample_coverage(value, invert), WebGLCommand::Scissor(x, y, width, height) => { // FIXME(nox): Kinda unfortunate that some u32 values could @@ -1666,6 +1674,29 @@ impl WebGLImpl { .send(gl.get_tex_parameter_iv(target, param as u32)) .unwrap(); }, + WebGLCommand::GetInternalFormatIntVec(target, internal_format, param, ref sender) => { + match param { + InternalFormatIntVec::Samples => { + let mut count = [0; 1]; + gl.get_internal_format_iv( + target, + internal_format, + gl::NUM_SAMPLE_COUNTS, + &mut count, + ); + assert!(count[0] >= 0); + + let mut values = vec![0; count[0] as usize]; + gl.get_internal_format_iv( + target, + internal_format, + param as u32, + &mut values, + ); + sender.send(values).unwrap() + }, + } + }, WebGLCommand::TexParameteri(target, param, value) => { gl.tex_parameter_i(target, param as u32, value) }, diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs index bf85e714905..3b943200d71 100644 --- a/components/canvas_traits/webgl.rs +++ b/components/canvas_traits/webgl.rs @@ -330,6 +330,7 @@ pub enum WebGLCommand { TransformFeedbackVaryings(WebGLProgramId, Vec<String>, u32), PolygonOffset(f32, f32), RenderbufferStorage(u32, u32, i32, i32), + RenderbufferStorageMultisample(u32, i32, u32, i32, i32), ReadPixels(Rect<u32>, u32, u32, IpcBytesSender), ReadPixelsPP(Rect<i32>, u32, u32, usize), SampleCoverage(f32, bool), @@ -458,6 +459,7 @@ pub enum WebGLCommand { GetCurrentVertexAttrib(u32, WebGLSender<[f32; 4]>), GetTexParameterFloat(u32, TexParameterFloat, WebGLSender<f32>), GetTexParameterInt(u32, TexParameterInt, WebGLSender<i32>), + GetInternalFormatIntVec(u32, u32, InternalFormatIntVec, WebGLSender<Vec<i32>>), TexParameteri(u32, u32, i32), TexParameterf(u32, u32, f32), DrawArrays { @@ -913,6 +915,14 @@ parameters! { } } +parameters! { + InternalFormatParameter { + IntVec(InternalFormatIntVec { + Samples = gl::SAMPLES, + }), + } +} + #[macro_export] macro_rules! gl_enums { ($(pub enum $name:ident { $($variant:ident = $mod:ident::$constant:ident,)+ })*) => { diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs index 699631de5d2..dabcd4cf54e 100644 --- a/components/script/dom/webgl2renderingcontext.rs +++ b/components/script/dom/webgl2renderingcontext.rs @@ -42,7 +42,8 @@ use crate::js::conversions::ToJSValConvertible; use crate::script_runtime::JSContext; use canvas_traits::webgl::WebGLError::*; use canvas_traits::webgl::{ - webgl_channel, GLContextAttributes, WebGLCommand, WebGLResult, WebGLVersion, + webgl_channel, GLContextAttributes, InternalFormatParameter, WebGLCommand, WebGLResult, + WebGLVersion, }; use dom_struct::dom_struct; use euclid::default::{Point2D, Rect, Size2D}; @@ -51,7 +52,7 @@ use js::jsapi::{JSObject, Type}; use js::jsval::{BooleanValue, DoubleValue, Int32Value, UInt32Value}; use js::jsval::{JSVal, NullValue, ObjectValue, UndefinedValue}; use js::rust::CustomAutoRooterGuard; -use js::typedarray::{ArrayBufferView, CreateWith, Float32, Uint32, Uint32Array}; +use js::typedarray::{ArrayBufferView, CreateWith, Float32, Int32Array, Uint32, Uint32Array}; use script_layout_interface::HTMLCanvasDataSource; use std::cell::Cell; use std::cmp; @@ -2459,6 +2460,9 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { &uniform_get(triple, WebGLCommand::GetUniformFloat4x3), ) }, + constants::SAMPLER_3D | constants::SAMPLER_2D_ARRAY => { + Int32Value(uniform_get(triple, WebGLCommand::GetUniformInt)) + }, _ => self.base.GetUniform(cx, program, location), } } @@ -3753,6 +3757,60 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { None => self.base.webgl_error(InvalidOperation), } } + + /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.5 + #[allow(unsafe_code)] + fn GetInternalformatParameter( + &self, + cx: JSContext, + target: u32, + internal_format: u32, + pname: u32, + ) -> JSVal { + if target != constants::RENDERBUFFER { + self.base.webgl_error(InvalidEnum); + return NullValue(); + } + + match handle_potential_webgl_error!( + self.base, + InternalFormatParameter::from_u32(pname), + return NullValue() + ) { + InternalFormatParameter::IntVec(param) => unsafe { + let (sender, receiver) = webgl_channel().unwrap(); + self.base + .send_command(WebGLCommand::GetInternalFormatIntVec( + target, + internal_format, + param, + sender, + )); + + rooted!(in(*cx) let mut rval = ptr::null_mut::<JSObject>()); + let _ = Int32Array::create( + *cx, + CreateWith::Slice(&receiver.recv().unwrap()), + rval.handle_mut(), + ) + .unwrap(); + ObjectValue(rval.get()) + }, + } + } + + /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.5 + fn RenderbufferStorageMultisample( + &self, + target: u32, + samples: i32, + internal_format: u32, + width: i32, + height: i32, + ) { + self.base + .renderbuffer_storage(target, samples, internal_format, width, height) + } } impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<WebGL2RenderingContext> { diff --git a/components/script/dom/webglrenderbuffer.rs b/components/script/dom/webglrenderbuffer.rs index bc1a11a7ecf..71e56bac1d3 100644 --- a/components/script/dom/webglrenderbuffer.rs +++ b/components/script/dom/webglrenderbuffer.rs @@ -14,7 +14,8 @@ use crate::dom::webglframebuffer::WebGLFramebuffer; use crate::dom::webglobject::WebGLObject; use crate::dom::webglrenderingcontext::WebGLRenderingContext; use canvas_traits::webgl::{ - webgl_channel, GlType, WebGLCommand, WebGLError, WebGLRenderbufferId, WebGLResult, WebGLVersion, + webgl_channel, GlType, InternalFormatIntVec, WebGLCommand, WebGLError, WebGLRenderbufferId, + WebGLResult, WebGLVersion, }; use dom_struct::dom_struct; use std::cell::Cell; @@ -133,11 +134,13 @@ impl WebGLRenderbuffer { pub fn storage( &self, api_type: GlType, + sample_count: i32, internal_format: u32, width: i32, height: i32, ) -> WebGLResult<()> { let is_gles = api_type == GlType::Gles; + let webgl_version = self.upcast().context().webgl_version(); // Validate the internal_format, and save it for completeness // validation. @@ -173,7 +176,7 @@ impl WebGLRenderbuffer { constants::DEPTH_COMPONENT24 | constants::DEPTH_COMPONENT32F | constants::DEPTH24_STENCIL8 | - constants::DEPTH32F_STENCIL8 => match self.upcast().context().webgl_version() { + constants::DEPTH32F_STENCIL8 => match webgl_version { WebGLVersion::WebGL1 => return Err(WebGLError::InvalidEnum), _ => internal_format, }, @@ -221,6 +224,22 @@ impl WebGLRenderbuffer { _ => return Err(WebGLError::InvalidEnum), }; + if webgl_version != WebGLVersion::WebGL1 { + let (sender, receiver) = webgl_channel().unwrap(); + self.upcast::<WebGLObject>().context().send_command( + WebGLCommand::GetInternalFormatIntVec( + constants::RENDERBUFFER, + internal_format, + InternalFormatIntVec::Samples, + sender, + ), + ); + let samples = receiver.recv().unwrap(); + if sample_count < 0 || sample_count as usize > samples.len() { + return Err(WebGLError::InvalidOperation); + } + } + self.internal_format.set(Some(internal_format)); self.is_initialized.set(false); @@ -228,17 +247,24 @@ impl WebGLRenderbuffer { fb.update_status(); } - self.upcast::<WebGLObject>() - .context() - .send_command(WebGLCommand::RenderbufferStorage( + let command = match sample_count { + 0 => WebGLCommand::RenderbufferStorage( constants::RENDERBUFFER, actual_format, width, height, - )); + ), + _ => WebGLCommand::RenderbufferStorageMultisample( + constants::RENDERBUFFER, + sample_count, + actual_format, + width, + height, + ), + }; + self.upcast::<WebGLObject>().context().send_command(command); self.size.set(Some((width, height))); - Ok(()) } diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index bda7c036d60..9f30edac79c 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1476,6 +1476,40 @@ impl WebGLRenderingContext { } slot.set(framebuffer); } + + pub fn renderbuffer_storage( + &self, + target: u32, + samples: i32, + internal_format: u32, + width: i32, + height: i32, + ) { + if target != constants::RENDERBUFFER { + return self.webgl_error(InvalidEnum); + } + + let max = self.limits.max_renderbuffer_size; + + if samples < 0 || width < 0 || width as u32 > max || height < 0 || height as u32 > max { + return self.webgl_error(InvalidValue); + } + + let rb = handle_potential_webgl_error!( + self, + self.bound_renderbuffer.get().ok_or(InvalidOperation), + return + ); + handle_potential_webgl_error!( + self, + rb.storage(self.api_type, samples, internal_format, width, height) + ); + if let Some(fb) = self.bound_draw_framebuffer.get() { + fb.invalidate_renderbuffer(&*rb); + } + + // FIXME: https://github.com/servo/servo/issues/13710 + } } #[cfg(not(feature = "webgl_backtrace"))] @@ -4336,30 +4370,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.7 fn RenderbufferStorage(&self, target: u32, internal_format: u32, width: i32, height: i32) { - if target != constants::RENDERBUFFER { - return self.webgl_error(InvalidEnum); - } - - let max = self.limits.max_renderbuffer_size; - - if width < 0 || width as u32 > max || height < 0 || height as u32 > max { - return self.webgl_error(InvalidValue); - } - - let rb = handle_potential_webgl_error!( - self, - self.bound_renderbuffer.get().ok_or(InvalidOperation), - return - ); - handle_potential_webgl_error!( - self, - rb.storage(self.api_type, internal_format, width, height) - ); - if let Some(fb) = self.bound_draw_framebuffer.get() { - fb.invalidate_renderbuffer(&*rb); - } - - // FIXME: https://github.com/servo/servo/issues/13710 + self.renderbuffer_storage(target, 0, internal_format, width, height) } // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.6 diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl index 72bd68a9f8a..c08bcb044b8 100644 --- a/components/script/dom/webidls/WebGL2RenderingContext.webidl +++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl @@ -316,9 +316,9 @@ interface mixin WebGL2RenderingContextBase // void readBuffer(GLenum src); /* Renderbuffer objects */ - // any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname); - // void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, - // GLsizei width, GLsizei height); + any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname); + void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, + GLsizei width, GLsizei height); /* Texture objects */ // void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, diff --git a/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini b/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini index d313f232cdd..ace9681c8eb 100644 --- a/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini +++ b/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini @@ -1,58 +1,52 @@ [methods-2.html] - [WebGL test #11: Property either does not exist or is not a function: compressedTexSubImage3D] + [WebGL test #2: Property either does not exist or is not a function: readBuffer] expected: FAIL - [WebGL test #8: Property either does not exist or is not a function: texSubImage3D] - expected: FAIL - - [WebGL test #14: Property either does not exist or is not a function: vertexAttribI4ui] - expected: FAIL - - [WebGL test #18: Property either does not exist or is not a function: drawBuffers] + [WebGL test #1: Property either does not exist or is not a function: blitFramebuffer] expected: FAIL - [WebGL test #12: Property either does not exist or is not a function: vertexAttribI4i] + [WebGL test #11: Property either does not exist or is not a function: vertexAttribI4iv] expected: FAIL - [WebGL test #6: Property either does not exist or is not a function: texStorage2D] + [WebGL test #8: Property either does not exist or is not a function: compressedTexImage3D] expected: FAIL - [WebGL test #1: Property either does not exist or is not a function: blitFramebuffer] + [WebGL test #13: Property either does not exist or is not a function: vertexAttribI4uiv] expected: FAIL - [WebGL test #5: Property either does not exist or is not a function: texImage3D] + [WebGL test #16: Property either does not exist or is not a function: drawBuffers] expected: FAIL - [WebGL test #17: Property either does not exist or is not a function: drawRangeElements] + [WebGL test #3: Property either does not exist or is not a function: texImage3D] expected: FAIL - [WebGL test #10: Property either does not exist or is not a function: compressedTexImage3D] + [WebGL test #10: Property either does not exist or is not a function: vertexAttribI4i] expected: FAIL - [WebGL test #7: Property either does not exist or is not a function: texStorage3D] + [WebGL test #9: Property either does not exist or is not a function: compressedTexSubImage3D] expected: FAIL - [WebGL test #4: Property either does not exist or is not a function: renderbufferStorageMultisample] + [WebGL test #12: Property either does not exist or is not a function: vertexAttribI4ui] expected: FAIL - [WebGL test #9: Property either does not exist or is not a function: copyTexSubImage3D] + [WebGL test #0: Property either does not exist or is not a function: isContextLost] expected: FAIL - [WebGL test #0: Property either does not exist or is not a function: isContextLost] + [WebGL test #7: Property either does not exist or is not a function: copyTexSubImage3D] expected: FAIL - [WebGL test #16: Property either does not exist or is not a function: vertexAttribIPointer] + [WebGL test #14: Property either does not exist or is not a function: vertexAttribIPointer] expected: FAIL - [WebGL test #15: Property either does not exist or is not a function: vertexAttribI4uiv] + [WebGL test #4: Property either does not exist or is not a function: texStorage2D] expected: FAIL - [WebGL test #2: Property either does not exist or is not a function: getInternalformatParameter] + [WebGL test #15: Property either does not exist or is not a function: drawRangeElements] expected: FAIL - [WebGL test #3: Property either does not exist or is not a function: readBuffer] + [WebGL test #6: Property either does not exist or is not a function: texSubImage3D] expected: FAIL - [WebGL test #13: Property either does not exist or is not a function: vertexAttribI4iv] + [WebGL test #5: Property either does not exist or is not a function: texStorage3D] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/renderbuffers/invalidate-framebuffer.html.ini b/tests/wpt/webgl/meta/conformance2/renderbuffers/invalidate-framebuffer.html.ini index 8744c2c1c17..d57af99063c 100644 --- a/tests/wpt/webgl/meta/conformance2/renderbuffers/invalidate-framebuffer.html.ini +++ b/tests/wpt/webgl/meta/conformance2/renderbuffers/invalidate-framebuffer.html.ini @@ -1,5 +1,8 @@ [invalidate-framebuffer.html] expected: ERROR - [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #17: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + expected: FAIL + + [WebGL test #11: getError expected: INVALID_VALUE. Was NO_ERROR : calling invalidateSubFramebuffer should generate INVALID_VALUE if width < 0 or height < 0.] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-depth-renderbuffer-initialization.html.ini b/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-depth-renderbuffer-initialization.html.ini index 3d222babfcc..8d5447a5ed6 100644 --- a/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-depth-renderbuffer-initialization.html.ini +++ b/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-depth-renderbuffer-initialization.html.ini @@ -1,5 +1,5 @@ [multisampled-depth-renderbuffer-initialization.html] expected: ERROR - [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-renderbuffer-initialization.html.ini b/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-renderbuffer-initialization.html.ini index 5abddb90d28..1e4be9d5ba4 100644 --- a/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-renderbuffer-initialization.html.ini +++ b/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-renderbuffer-initialization.html.ini @@ -1,5 +1,5 @@ [multisampled-renderbuffer-initialization.html] expected: ERROR - [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #9: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-stencil-renderbuffer-initialization.html.ini b/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-stencil-renderbuffer-initialization.html.ini index 98a35d80252..3261c2fcfde 100644 --- a/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-stencil-renderbuffer-initialization.html.ini +++ b/tests/wpt/webgl/meta/conformance2/renderbuffers/multisampled-stencil-renderbuffer-initialization.html.ini @@ -1,5 +1,5 @@ [multisampled-stencil-renderbuffer-initialization.html] expected: ERROR - [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-multisampled-readbuffer.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-multisampled-readbuffer.html.ini index ba69247442f..dfe456b6f2f 100644 --- a/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-multisampled-readbuffer.html.ini +++ b/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-multisampled-readbuffer.html.ini @@ -1,5 +1,7 @@ [blitframebuffer-multisampled-readbuffer.html] - expected: ERROR - [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #2: Framebuffer incomplete.] + expected: FAIL + + [WebGL test #1: Framebuffer incomplete.] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-resolve-to-back-buffer.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-resolve-to-back-buffer.html.ini index 82844ff40e4..b34649f0f2c 100644 --- a/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-resolve-to-back-buffer.html.ini +++ b/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-resolve-to-back-buffer.html.ini @@ -1,5 +1,5 @@ [blitframebuffer-resolve-to-back-buffer.html] expected: ERROR - [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/rendering/line-rendering-quality.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/line-rendering-quality.html.ini index 9068b4e65bb..0e6f6c09150 100644 --- a/tests/wpt/webgl/meta/conformance2/rendering/line-rendering-quality.html.ini +++ b/tests/wpt/webgl/meta/conformance2/rendering/line-rendering-quality.html.ini @@ -1,5 +1,5 @@ [line-rendering-quality.html] expected: ERROR - [WebGL test #6: successfullyParsed should be true. Threw exception ReferenceError: can't access lexical declaration `successfullyParsed' before initialization] + [WebGL test #10: successfullyParsed should be true. Threw exception ReferenceError: can't access lexical declaration `successfullyParsed' before initialization] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/rendering/rgb-format-support.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/rgb-format-support.html.ini index a2b426c9e36..37f90550f16 100644 --- a/tests/wpt/webgl/meta/conformance2/rendering/rgb-format-support.html.ini +++ b/tests/wpt/webgl/meta/conformance2/rendering/rgb-format-support.html.ini @@ -1,5 +1,10 @@ [rgb-format-support.html] - expected: ERROR - [WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #15: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : should be no errors from clear()] + expected: FAIL + + [WebGL test #14: framebuffer with texture is incomplete] + expected: FAIL + + [WebGL test #13: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors from texture setup] expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini b/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini index e716cca6804..4a27c171b93 100644 --- a/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini +++ b/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini @@ -1,11 +1,23 @@ [gl-object-get-calls.html] expected: ERROR + [WebGL test #257: getError expected: NO_ERROR. Was INVALID_OPERATION : ] + expected: FAIL + [WebGL test #10: gl.getBufferParameter(gl.COPY_WRITE_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).] expected: FAIL [WebGL test #18: gl.getBufferParameter(gl.TRANSFORM_FEEDBACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).] expected: FAIL + [WebGL test #182: gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_SAMPLES) should be 4 (of type number). Was null (of type object).] + expected: FAIL + + [WebGL test #204: getTexParameter returned 1 instead of null for invalid parameter enum: 0x84fe] + expected: FAIL + + [WebGL test #199: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LOD) should be 10 (of type number). Was null (of type object).] + expected: FAIL + [WebGL test #19: gl.getBufferParameter(gl.TRANSFORM_FEEDBACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).] expected: FAIL @@ -15,6 +27,9 @@ [WebGL test #15: gl.getBufferParameter(gl.PIXEL_UNPACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).] expected: FAIL + [WebGL test #202: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_FORMAT) should be false (of type boolean). Was null (of type object).] + expected: FAIL + [WebGL test #7: gl.getBufferParameter(gl.COPY_READ_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).] expected: FAIL @@ -24,22 +39,52 @@ [WebGL test #16: gl.getBufferParameter(gl.PIXEL_UNPACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).] expected: FAIL + [WebGL test #201: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_R) should be 33071 (of type number). Was null (of type object).] + expected: FAIL + [WebGL test #6: gl.getBufferParameter(gl.COPY_READ_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).] expected: FAIL + [WebGL test #203: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_LEVELS) should be 0 (of type number). Was null (of type object).] + expected: FAIL + [WebGL test #22: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).] expected: FAIL [WebGL test #12: gl.getBufferParameter(gl.PIXEL_PACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).] expected: FAIL + [WebGL test #196: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC) should be 515 (of type number). Was null (of type object).] + expected: FAIL + + [WebGL test #195: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_BASE_LEVEL) should be 0 (of type number). Was null (of type object).] + expected: FAIL + [WebGL test #13: gl.getBufferParameter(gl.PIXEL_PACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).] expected: FAIL + [WebGL test #197: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE) should be 34894 (of type number). Was null (of type object).] + expected: FAIL + [WebGL test #167: gl.getProgramParameter(uniformBlockProgram, gl.ACTIVE_UNIFORM_BLOCKS) should be 1 (of type number). Was null (of type object).] expected: FAIL - [WebGL test #182: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] + [WebGL test #268: gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be false (of type boolean). Was null (of type object).] + expected: FAIL + + [WebGL test #259: gl.getUniform(samplerForWebGL2Program, s2DArrayValLoc) should be 1. Was 0.] + expected: FAIL + + [WebGL test #198: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LEVEL) should be 10 (of type number). Was null (of type object).] + expected: FAIL + + [WebGL test #200: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MIN_LOD) should be 0 (of type number). Was null (of type object).] + expected: FAIL + + [WebGL test #183: getRenderbufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR] + expected: FAIL + + [WebGL test #274: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] expected: FAIL [WebGL test #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).] |