Auto merge of #21129 - servo:webgl, r=emilio

Implement instanced WebGL drawing calls (part of #20791)

This is half of #20599. The check for drawElements is a bit more complex to implement.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21129)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-07-08 04:45:37 -04:00 committed by GitHub
commit 41e105733c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 612 additions and 487 deletions

View file

@ -885,6 +885,13 @@ impl WebGLImpl {
} }
sender.send(value[0]).unwrap() sender.send(value[0]).unwrap()
} }
WebGLCommand::GetParameterInt2(param, ref sender) => {
let mut value = [0; 2];
unsafe {
ctx.gl().get_integer_v(param as u32, &mut value);
}
sender.send(value).unwrap()
}
WebGLCommand::GetParameterInt4(param, ref sender) => { WebGLCommand::GetParameterInt4(param, ref sender) => {
let mut value = [0; 4]; let mut value = [0; 4];
unsafe { unsafe {
@ -966,6 +973,15 @@ impl WebGLImpl {
WebGLCommand::UseProgram(program_id) => { WebGLCommand::UseProgram(program_id) => {
ctx.gl().use_program(program_id.map_or(0, |p| p.get())) ctx.gl().use_program(program_id.map_or(0, |p| p.get()))
} }
WebGLCommand::DrawArraysInstanced { mode, first, count, primcount } => {
ctx.gl().draw_arrays_instanced(mode, first, count, primcount)
}
WebGLCommand::DrawElementsInstanced { mode, count, type_, offset, primcount } => {
ctx.gl().draw_elements_instanced(mode, count, type_, offset, primcount)
}
WebGLCommand::VertexAttribDivisor { index, divisor } => {
ctx.gl().vertex_attrib_divisor(index, divisor)
}
} }
// TODO: update test expectations in order to enable debug assertions // TODO: update test expectations in order to enable debug assertions

View file

@ -268,6 +268,7 @@ pub enum WebGLCommand {
GetParameterBool(ParameterBool, WebGLSender<bool>), GetParameterBool(ParameterBool, WebGLSender<bool>),
GetParameterBool4(ParameterBool4, WebGLSender<[bool; 4]>), GetParameterBool4(ParameterBool4, WebGLSender<[bool; 4]>),
GetParameterInt(ParameterInt, WebGLSender<i32>), GetParameterInt(ParameterInt, WebGLSender<i32>),
GetParameterInt2(ParameterInt2, WebGLSender<[i32; 2]>),
GetParameterInt4(ParameterInt4, WebGLSender<[i32; 4]>), GetParameterInt4(ParameterInt4, WebGLSender<[i32; 4]>),
GetParameterFloat(ParameterFloat, WebGLSender<f32>), GetParameterFloat(ParameterFloat, WebGLSender<f32>),
GetParameterFloat2(ParameterFloat2, WebGLSender<[f32; 2]>), GetParameterFloat2(ParameterFloat2, WebGLSender<[f32; 2]>),
@ -281,6 +282,9 @@ pub enum WebGLCommand {
GetTexParameterInt(u32, TexParameterInt, WebGLSender<i32>), GetTexParameterInt(u32, TexParameterInt, WebGLSender<i32>),
TexParameteri(u32, TexParameterInt, i32), TexParameteri(u32, TexParameterInt, i32),
TexParameterf(u32, TexParameterFloat, f32), TexParameterf(u32, TexParameterFloat, f32),
DrawArraysInstanced { mode: u32, first: i32, count: i32, primcount: i32 },
DrawElementsInstanced { mode: u32, count: i32, type_: u32, offset: u32, primcount: i32 },
VertexAttribDivisor { index: u32, divisor: u32 },
} }
macro_rules! define_resource_id_struct { macro_rules! define_resource_id_struct {
@ -522,6 +526,9 @@ parameters! {
SubpixelBits = gl::SUBPIXEL_BITS, SubpixelBits = gl::SUBPIXEL_BITS,
UnpackAlignment = gl::UNPACK_ALIGNMENT, UnpackAlignment = gl::UNPACK_ALIGNMENT,
}), }),
Int2(ParameterInt2 {
MaxViewportDims = gl::MAX_VIEWPORT_DIMS,
}),
Int4(ParameterInt4 { Int4(ParameterInt4 {
ScissorBox = gl::SCISSOR_BOX, ScissorBox = gl::SCISSOR_BOX,
Viewport = gl::VIEWPORT, Viewport = gl::VIEWPORT,

View file

@ -937,6 +937,34 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
) -> Option<Vec<DomRoot<WebGLShader>>> { ) -> Option<Vec<DomRoot<WebGLShader>>> {
self.base.GetAttachedShaders(program) self.base.GetAttachedShaders(program)
} }
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
fn DrawArraysInstanced(
&self,
mode: u32,
first: i32,
count: i32,
primcount: i32,
) {
self.base.draw_arrays_instanced(mode, first, count, primcount);
}
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
fn DrawElementsInstanced(
&self,
mode: u32,
count: i32,
type_: u32,
offset: i64,
primcount: i32,
) {
self.base.draw_elements_instanced(mode, count, type_, offset, primcount);
}
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.9
fn VertexAttribDivisor(&self, index: u32, divisor: u32) {
self.base.vertex_attrib_divisor(index, divisor);
}
} }

View file

@ -0,0 +1,92 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding;
use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysMethods;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bindings::root::{Dom, DomRoot};
use dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
#[dom_struct]
pub struct ANGLEInstancedArrays {
reflector_: Reflector,
ctx: Dom<WebGLRenderingContext>,
}
impl ANGLEInstancedArrays {
fn new_inherited(ctx: &WebGLRenderingContext) -> Self {
Self {
reflector_: Reflector::new(),
ctx: Dom::from_ref(ctx),
}
}
}
impl WebGLExtension for ANGLEInstancedArrays {
type Extension = Self;
fn new(ctx: &WebGLRenderingContext) -> DomRoot<Self> {
reflect_dom_object(
Box::new(ANGLEInstancedArrays::new_inherited(ctx)),
&*ctx.global(),
ANGLEInstancedArraysBinding::Wrap,
)
}
fn spec() -> WebGLExtensionSpec {
WebGLExtensionSpec::Specific(WebGLVersion::WebGL1)
}
fn is_supported(ext: &WebGLExtensions) -> bool {
ext.supports_any_gl_extension(&[
"GL_ANGLE_instanced_arrays",
"GL_ARB_instanced_arrays",
"GL_EXT_instanced_arrays",
"GL_NV_instanced_arrays",
])
}
fn enable(ext: &WebGLExtensions) {
ext.enable_get_vertex_attrib_name(
ANGLEInstancedArraysConstants::VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE,
);
}
fn name() -> &'static str {
"ANGLE_instanced_arrays"
}
}
impl ANGLEInstancedArraysMethods for ANGLEInstancedArrays {
// https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
fn DrawArraysInstancedANGLE(
&self,
mode: u32,
first: i32,
count: i32,
primcount: i32,
) {
self.ctx.draw_arrays_instanced(mode, first, count, primcount);
}
// https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
fn DrawElementsInstancedANGLE(
&self,
mode: u32,
count: i32,
type_: u32,
offset: i64,
primcount: i32,
) {
self.ctx.draw_elements_instanced(mode, count, type_, offset, primcount);
}
fn VertexAttribDivisorANGLE(&self, index: u32, divisor: u32) {
self.ctx.vertex_attrib_divisor(index, divisor);
}
}

View file

@ -5,6 +5,7 @@
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
use super::{ext_constants, WebGLExtension, WebGLExtensions, WebGLExtensionSpec}; use super::{ext_constants, WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
pub mod angleinstancedarrays;
pub mod extblendminmax; pub mod extblendminmax;
pub mod extshadertexturelod; pub mod extshadertexturelod;
pub mod exttexturefilteranisotropic; pub mod exttexturefilteranisotropic;

View file

@ -4,6 +4,7 @@
use canvas_traits::webgl::{WebGLError, WebGLVersion}; use canvas_traits::webgl::{WebGLError, WebGLVersion};
use dom::bindings::cell::DomRefCell; use dom::bindings::cell::DomRefCell;
use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
use dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants; use dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants; use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants; use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
@ -54,6 +55,13 @@ const DEFAULT_DISABLED_GET_TEX_PARAMETER_NAMES_WEBGL1: [GLenum; 1] = [
EXTTextureFilterAnisotropicConstants::TEXTURE_MAX_ANISOTROPY_EXT, EXTTextureFilterAnisotropicConstants::TEXTURE_MAX_ANISOTROPY_EXT,
]; ];
// Param names that are implemented for glGetVertexAttrib in a WebGL 1.0 context
// but must trigger a InvalidEnum error until the related WebGL Extensions are enabled.
// Example: https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
const DEFAULT_DISABLED_GET_VERTEX_ATTRIB_NAMES_WEBGL1: [GLenum; 1] = [
ANGLEInstancedArraysConstants::VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE,
];
/// WebGL features that are enabled/disabled by WebGL Extensions. /// WebGL features that are enabled/disabled by WebGL Extensions.
#[derive(JSTraceable, MallocSizeOf)] #[derive(JSTraceable, MallocSizeOf)]
struct WebGLExtensionFeatures { struct WebGLExtensionFeatures {
@ -68,6 +76,8 @@ struct WebGLExtensionFeatures {
disabled_get_parameter_names: FnvHashSet<GLenum>, disabled_get_parameter_names: FnvHashSet<GLenum>,
/// WebGL GetTexParameter() names enabled by extensions. /// WebGL GetTexParameter() names enabled by extensions.
disabled_get_tex_parameter_names: FnvHashSet<GLenum>, disabled_get_tex_parameter_names: FnvHashSet<GLenum>,
/// WebGL GetAttribVertex() names enabled by extensions.
disabled_get_vertex_attrib_names: FnvHashSet<GLenum>,
/// WebGL OES_element_index_uint extension. /// WebGL OES_element_index_uint extension.
element_index_uint_enabled: bool, element_index_uint_enabled: bool,
/// WebGL EXT_blend_minmax extension. /// WebGL EXT_blend_minmax extension.
@ -80,6 +90,7 @@ impl WebGLExtensionFeatures {
disabled_tex_types, disabled_tex_types,
disabled_get_parameter_names, disabled_get_parameter_names,
disabled_get_tex_parameter_names, disabled_get_tex_parameter_names,
disabled_get_vertex_attrib_names,
element_index_uint_enabled, element_index_uint_enabled,
blend_minmax_enabled, blend_minmax_enabled,
) = match webgl_version { ) = match webgl_version {
@ -88,12 +99,20 @@ impl WebGLExtensionFeatures {
DEFAULT_DISABLED_TEX_TYPES_WEBGL1.iter().cloned().collect(), DEFAULT_DISABLED_TEX_TYPES_WEBGL1.iter().cloned().collect(),
DEFAULT_DISABLED_GET_PARAMETER_NAMES_WEBGL1.iter().cloned().collect(), DEFAULT_DISABLED_GET_PARAMETER_NAMES_WEBGL1.iter().cloned().collect(),
DEFAULT_DISABLED_GET_TEX_PARAMETER_NAMES_WEBGL1.iter().cloned().collect(), DEFAULT_DISABLED_GET_TEX_PARAMETER_NAMES_WEBGL1.iter().cloned().collect(),
DEFAULT_DISABLED_GET_VERTEX_ATTRIB_NAMES_WEBGL1.iter().cloned().collect(),
false, false,
false, false,
) )
}, },
WebGLVersion::WebGL2 => { WebGLVersion::WebGL2 => {
(Default::default(), Default::default(), Default::default(), true, true) (
Default::default(),
Default::default(),
Default::default(),
Default::default(),
true,
true,
)
} }
}; };
Self { Self {
@ -105,6 +124,7 @@ impl WebGLExtensionFeatures {
hint_targets: Default::default(), hint_targets: Default::default(),
disabled_get_parameter_names, disabled_get_parameter_names,
disabled_get_tex_parameter_names, disabled_get_tex_parameter_names,
disabled_get_vertex_attrib_names,
element_index_uint_enabled, element_index_uint_enabled,
blend_minmax_enabled, blend_minmax_enabled,
} }
@ -269,7 +289,16 @@ impl WebGLExtensions {
!self.features.borrow().disabled_get_tex_parameter_names.contains(&name) !self.features.borrow().disabled_get_tex_parameter_names.contains(&name)
} }
pub fn enable_get_vertex_attrib_name(&self, name: GLenum) {
self.features.borrow_mut().disabled_get_vertex_attrib_names.remove(&name);
}
pub fn is_get_vertex_attrib_name_enabled(&self, name: GLenum) -> bool {
!self.features.borrow().disabled_get_vertex_attrib_names.contains(&name)
}
fn register_all_extensions(&self) { fn register_all_extensions(&self) {
self.register::<ext::angleinstancedarrays::ANGLEInstancedArrays>();
self.register::<ext::extblendminmax::EXTBlendMinmax>(); self.register::<ext::extblendminmax::EXTBlendMinmax>();
self.register::<ext::extshadertexturelod::EXTShaderTextureLod>(); self.register::<ext::extshadertexturelod::EXTShaderTextureLod>();
self.register::<ext::exttexturefilteranisotropic::EXTTextureFilterAnisotropic>(); self.register::<ext::exttexturefilteranisotropic::EXTTextureFilterAnisotropic>();

View file

@ -4,7 +4,7 @@
use byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
use canvas_traits::canvas::{byte_swap, multiply_u8_pixel}; use canvas_traits::canvas::{byte_swap, multiply_u8_pixel};
use canvas_traits::webgl::{DOMToTextureCommand, Parameter}; use canvas_traits::webgl::{ActiveAttribInfo, DOMToTextureCommand, Parameter};
use canvas_traits::webgl::{ShaderParameter, TexParameter, WebGLCommand}; use canvas_traits::webgl::{ShaderParameter, TexParameter, WebGLCommand};
use canvas_traits::webgl::{WebGLContextShareMode, WebGLError}; use canvas_traits::webgl::{WebGLContextShareMode, WebGLError};
use canvas_traits::webgl::{WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender}; use canvas_traits::webgl::{WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender};
@ -12,6 +12,7 @@ use canvas_traits::webgl::{WebGLResult, WebGLSLVersion, WebGLVersion};
use canvas_traits::webgl::{WebVRCommand, webgl_channel}; use canvas_traits::webgl::{WebVRCommand, webgl_channel};
use canvas_traits::webgl::WebGLError::*; use canvas_traits::webgl::WebGLError::*;
use dom::bindings::cell::DomRefCell; use dom::bindings::cell::DomRefCell;
use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
use dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants; use dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants;
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes}; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
@ -52,9 +53,10 @@ use euclid::Size2D;
use fnv::FnvHashMap; use fnv::FnvHashMap;
use half::f16; use half::f16;
use js::jsapi::{JSContext, JSObject, Type}; use js::jsapi::{JSContext, JSObject, Type};
use js::jsval::{BooleanValue, DoubleValue, Int32Value, UInt32Value, JSVal, NullValue, UndefinedValue}; use js::jsval::{BooleanValue, DoubleValue, Int32Value, UInt32Value, JSVal};
use js::jsval::{ObjectValue, NullValue, UndefinedValue};
use js::rust::CustomAutoRooterGuard; use js::rust::CustomAutoRooterGuard;
use js::typedarray::ArrayBufferView; use js::typedarray::{ArrayBufferView, CreateWith, Float32Array, Int32Array, Uint32Array};
use net_traits::image::base::PixelFormat; use net_traits::image::base::PixelFormat;
use net_traits::image_cache::ImageResponse; use net_traits::image_cache::ImageResponse;
use offscreen_gl_context::{GLContextAttributes, GLLimits}; use offscreen_gl_context::{GLContextAttributes, GLLimits};
@ -63,7 +65,7 @@ use script_layout_interface::HTMLCanvasDataSource;
use servo_config::prefs::PREFS; use servo_config::prefs::PREFS;
use std::cell::{Cell, Ref}; use std::cell::{Cell, Ref};
use std::cmp; use std::cmp;
use std::ptr::NonNull; use std::ptr::{self, NonNull};
use webrender_api; use webrender_api;
type ImagePixelResult = Result<(Vec<u8>, Size2D<i32>, bool), ()>; type ImagePixelResult = Result<(Vec<u8>, Size2D<i32>, bool), ()>;
@ -250,7 +252,7 @@ impl WebGLRenderingContext {
current_vertex_attrib_0: Cell::new((0f32, 0f32, 0f32, 1f32)), current_vertex_attrib_0: Cell::new((0f32, 0f32, 0f32, 1f32)),
current_scissor: Cell::new((0, 0, size.width, size.height)), current_scissor: Cell::new((0, 0, size.width, size.height)),
current_clear_color: Cell::new((0.0, 0.0, 0.0, 0.0)), current_clear_color: Cell::new((0.0, 0.0, 0.0, 0.0)),
extension_manager: WebGLExtensions::new(webgl_version) extension_manager: WebGLExtensions::new(webgl_version),
} }
}) })
} }
@ -1155,6 +1157,142 @@ impl WebGLRenderingContext {
} }
} }
// https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
pub fn draw_arrays_instanced(
&self,
mode: u32,
first: i32,
count: i32,
primcount: i32,
) {
match mode {
constants::POINTS | constants::LINE_STRIP |
constants::LINE_LOOP | constants::LINES |
constants::TRIANGLE_STRIP | constants::TRIANGLE_FAN |
constants::TRIANGLES => {},
_ => {
return self.webgl_error(InvalidEnum);
}
}
if first < 0 || count < 0 || primcount < 0 {
return self.webgl_error(InvalidValue);
}
let current_program = handle_potential_webgl_error!(
self,
self.current_program.get().ok_or(InvalidOperation),
return
);
let required_len = if count > 0 {
handle_potential_webgl_error!(
self,
first.checked_add(count).map(|len| len as u32).ok_or(InvalidOperation),
return
)
} else {
0
};
handle_potential_webgl_error!(
self,
self.vertex_attribs.validate_for_draw(required_len, primcount as u32, &current_program.active_attribs()),
return
);
if !self.validate_framebuffer_complete() {
return;
}
self.send_command(
WebGLCommand::DrawArraysInstanced { mode, first, count, primcount },
);
self.mark_as_dirty();
}
// https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
pub fn draw_elements_instanced(
&self,
mode: u32,
count: i32,
type_: u32,
offset: i64,
primcount: i32,
) {
match mode {
constants::POINTS | constants::LINE_STRIP |
constants::LINE_LOOP | constants::LINES |
constants::TRIANGLE_STRIP | constants::TRIANGLE_FAN |
constants::TRIANGLES => {},
_ => {
return self.webgl_error(InvalidEnum);
}
}
if count < 0 || offset < 0 || primcount < 0 {
return self.webgl_error(InvalidValue);
}
let type_size = match type_ {
constants::UNSIGNED_BYTE => 1,
constants::UNSIGNED_SHORT => 2,
_ => return self.webgl_error(InvalidEnum),
};
if offset % type_size != 0 {
return self.webgl_error(InvalidOperation);
}
let current_program = handle_potential_webgl_error!(
self,
self.current_program.get().ok_or(InvalidOperation),
return
);
if count > 0 && primcount > 0 {
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);
}
}
// TODO(nox): Pass the correct number of vertices required.
handle_potential_webgl_error!(
self,
self.vertex_attribs.validate_for_draw(0, primcount as u32, &current_program.active_attribs()),
return
);
if !self.validate_framebuffer_complete() {
return;
}
self.send_command(WebGLCommand::DrawElementsInstanced {
mode,
count,
type_,
offset: offset as u32,
primcount,
});
self.mark_as_dirty();
}
pub fn vertex_attrib_divisor(&self, index: u32, divisor: u32) {
if index >= self.limits.max_vertex_attribs {
return self.webgl_error(InvalidValue);
}
self.vertex_attribs.set_divisor(index, divisor);
self.send_command(WebGLCommand::VertexAttribDivisor { index, divisor });
}
// Used by HTMLCanvasElement.toDataURL // Used by HTMLCanvasElement.toDataURL
// //
// This emits errors quite liberally, but the spec says that this operation // This emits errors quite liberally, but the spec says that this operation
@ -1331,6 +1469,16 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
return Int32Value(constants::UNSIGNED_BYTE as i32); return Int32Value(constants::UNSIGNED_BYTE as i32);
} }
} }
constants::COMPRESSED_TEXTURE_FORMATS => {
// FIXME(nox): https://github.com/servo/servo/issues/20594
rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
let _ = Uint32Array::create(
cx,
CreateWith::Slice(&[]),
rval.handle_mut(),
).unwrap();
return ObjectValue(rval.get());
}
constants::VERSION => { constants::VERSION => {
rooted!(in(cx) let mut rval = UndefinedValue()); rooted!(in(cx) let mut rval = UndefinedValue());
"WebGL 1.0".to_jsval(cx, rval.handle_mut()); "WebGL 1.0".to_jsval(cx, rval.handle_mut());
@ -1422,13 +1570,27 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
self.send_command(WebGLCommand::GetParameterInt(param, sender)); self.send_command(WebGLCommand::GetParameterInt(param, sender));
Int32Value(receiver.recv().unwrap()) Int32Value(receiver.recv().unwrap())
} }
Parameter::Int2(param) => {
let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetParameterInt2(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())
}
Parameter::Int4(param) => { Parameter::Int4(param) => {
let (sender, receiver) = webgl_channel().unwrap(); let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetParameterInt4(param, sender)); self.send_command(WebGLCommand::GetParameterInt4(param, sender));
// FIXME(nox): https://github.com/servo/servo/issues/20655 rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
rooted!(in(cx) let mut rval = UndefinedValue()); let _ = Int32Array::create(
receiver.recv().unwrap().to_jsval(cx, rval.handle_mut()); cx,
rval.get() CreateWith::Slice(&receiver.recv().unwrap()),
rval.handle_mut(),
).unwrap();
ObjectValue(rval.get())
} }
Parameter::Float(param) => { Parameter::Float(param) => {
let (sender, receiver) = webgl_channel().unwrap(); let (sender, receiver) = webgl_channel().unwrap();
@ -1438,18 +1600,24 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Parameter::Float2(param) => { Parameter::Float2(param) => {
let (sender, receiver) = webgl_channel().unwrap(); let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetParameterFloat2(param, sender)); self.send_command(WebGLCommand::GetParameterFloat2(param, sender));
// FIXME(nox): https://github.com/servo/servo/issues/20655 rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
rooted!(in(cx) let mut rval = UndefinedValue()); let _ = Float32Array::create(
receiver.recv().unwrap().to_jsval(cx, rval.handle_mut()); cx,
rval.get() CreateWith::Slice(&receiver.recv().unwrap()),
rval.handle_mut(),
).unwrap();
ObjectValue(rval.get())
} }
Parameter::Float4(param) => { Parameter::Float4(param) => {
let (sender, receiver) = webgl_channel().unwrap(); let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetParameterFloat4(param, sender)); self.send_command(WebGLCommand::GetParameterFloat4(param, sender));
// FIXME(nox): https://github.com/servo/servo/issues/20655 rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
rooted!(in(cx) let mut rval = UndefinedValue()); let _ = Float32Array::create(
receiver.recv().unwrap().to_jsval(cx, rval.handle_mut()); cx,
rval.get() CreateWith::Slice(&receiver.recv().unwrap()),
rval.handle_mut(),
).unwrap();
ObjectValue(rval.get())
} }
} }
} }
@ -2021,7 +2189,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
fn CompileShader(&self, shader: &WebGLShader) { fn CompileShader(&self, shader: &WebGLShader) {
handle_potential_webgl_error!( handle_potential_webgl_error!(
self, self,
shader.compile(self.webgl_version, self.glsl_version, &self.extension_manager) shader.compile(
self.webgl_version,
self.glsl_version,
&self.limits,
&self.extension_manager,
)
) )
} }
@ -2193,16 +2366,28 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
if first < 0 || count < 0 { if first < 0 || count < 0 {
return self.webgl_error(InvalidValue); return self.webgl_error(InvalidValue);
} }
if self.current_program.get().is_none() {
return self.webgl_error(InvalidOperation);
}
if let Some(array_buffer) = self.bound_buffer_array.get() {
if count > 0 && (first as u64 + count as u64 > array_buffer.capacity() as u64) {
return self.webgl_error(InvalidOperation);
}
}
handle_potential_webgl_error!(self, self.vertex_attribs.validate_for_draw(), return); let current_program = handle_potential_webgl_error!(
self,
self.current_program.get().ok_or(InvalidOperation),
return
);
let required_len = if count > 0 {
handle_potential_webgl_error!(
self,
first.checked_add(count).map(|len| len as u32).ok_or(InvalidOperation),
return
)
} else {
0
};
handle_potential_webgl_error!(
self,
self.vertex_attribs.validate_for_draw(required_len, 1, &current_program.active_attribs()),
return
);
if !self.validate_framebuffer_complete() { if !self.validate_framebuffer_complete() {
return; return;
@ -2244,15 +2429,11 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
return self.webgl_error(InvalidValue); return self.webgl_error(InvalidValue);
} }
if self.current_program.get().is_none() { let current_program = handle_potential_webgl_error!(
// From the WebGL spec self,
// self.current_program.get().ok_or(InvalidOperation),
// If the CURRENT_PROGRAM is null, an INVALID_OPERATION error will be generated. return
// 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 count > 0 { if count > 0 {
if let Some(array_buffer) = self.bound_buffer_element_array.get() { if let Some(array_buffer) = self.bound_buffer_element_array.get() {
@ -2271,7 +2452,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
} }
} }
handle_potential_webgl_error!(self, self.vertex_attribs.validate_for_draw(), return); // TODO(nox): Pass the correct number of vertices required.
handle_potential_webgl_error!(
self,
self.vertex_attribs.validate_for_draw(0, 1, &current_program.active_attribs()),
return
);
if !self.validate_framebuffer_complete() { if !self.validate_framebuffer_complete() {
return; return;
@ -2522,7 +2708,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString> { fn GetShaderInfoLog(&self, shader: &WebGLShader) -> Option<DOMString> {
shader.info_log().map(DOMString::from) // TODO(nox): https://github.com/servo/servo/issues/21133
Some(shader.info_log())
} }
#[allow(unsafe_code)] #[allow(unsafe_code)]
@ -2602,10 +2789,18 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
self.send_command(WebGLCommand::GetCurrentVertexAttrib(index, sender)); self.send_command(WebGLCommand::GetCurrentVertexAttrib(index, sender));
receiver.recv().unwrap() receiver.recv().unwrap()
}; };
// FIXME(nox): https://github.com/servo/servo/issues/20655 rooted!(in(cx) let mut result = ptr::null_mut::<JSObject>());
rooted!(in(cx) let mut result = UndefinedValue()); let _ = Float32Array::create(
value.to_jsval(cx, result.handle_mut()); cx,
return result.get(); CreateWith::Slice(&value),
result.handle_mut(),
).unwrap();
return ObjectValue(result.get());
}
if !self.extension_manager.is_get_vertex_attrib_name_enabled(param) {
self.webgl_error(WebGLError::InvalidEnum);
return NullValue();
} }
match param { match param {
@ -2623,6 +2818,9 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
} }
jsval.get() jsval.get()
} }
ANGLEInstancedArraysConstants::VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE => {
Int32Value(data.divisor as i32)
}
_ => { _ => {
self.webgl_error(InvalidEnum); self.webgl_error(InvalidEnum);
NullValue() NullValue()
@ -2968,7 +3166,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString> { fn GetShaderSource(&self, shader: &WebGLShader) -> Option<DOMString> {
shader.source() // TODO(nox): https://github.com/servo/servo/issues/21133
Some(shader.source())
} }
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10 // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
@ -3828,19 +4027,14 @@ impl VertexAttribs {
if stride < 0 || stride > 255 || offset < 0 { if stride < 0 || stride > 255 || offset < 0 {
return Err(InvalidValue); return Err(InvalidValue);
} }
match type_ { let bytes_per_component: i32 = match type_ {
constants::BYTE | constants::UNSIGNED_BYTE => {}, constants::BYTE | constants::UNSIGNED_BYTE => 1,
constants::SHORT | constants::UNSIGNED_SHORT => { constants::SHORT | constants::UNSIGNED_SHORT => 2,
if offset % 2 > 0 || stride % 2 > 0 { constants::FLOAT => 4,
return Err(InvalidOperation);
}
},
constants::FLOAT => {
if offset % 4 > 0 || stride % 4 > 0 {
return Err(InvalidOperation);
}
},
_ => return Err(InvalidEnum), _ => return Err(InvalidEnum),
};
if offset % bytes_per_component as i64 > 0 || stride % bytes_per_component > 0 {
return Err(InvalidOperation);
} }
let buffer = buffer.ok_or(InvalidOperation)?; let buffer = buffer.ok_or(InvalidOperation)?;
@ -3849,10 +4043,12 @@ impl VertexAttribs {
enabled_as_array: data.enabled_as_array, enabled_as_array: data.enabled_as_array,
size: size as u8, size: size as u8,
type_, type_,
bytes_per_vertex: size as u8 * bytes_per_component as u8,
normalized, normalized,
stride: stride as u8, stride: stride as u8,
offset: offset as u32, offset: offset as u32,
buffer: Some(Dom::from_ref(buffer)), buffer: Some(Dom::from_ref(buffer)),
divisor: data.divisor,
}; };
Ok(()) Ok(())
} }
@ -3877,9 +4073,49 @@ impl VertexAttribs {
self.attribs.borrow_mut()[index as usize].enabled_as_array = value; self.attribs.borrow_mut()[index as usize].enabled_as_array = value;
} }
fn validate_for_draw(&self) -> WebGLResult<()> { fn set_divisor(&self, index: u32, value: u32) {
self.attribs.borrow_mut()[index as usize].divisor = value;
}
fn validate_for_draw(
&self,
required_len: u32,
instance_count: u32,
active_attribs: &[ActiveAttribInfo],
) -> WebGLResult<()> {
// TODO(nox): Cache limits per VAO.
let attribs = self.attribs.borrow();
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.2 // https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.2
if self.borrow().iter().any(|data| data.enabled_as_array && data.buffer.is_none()) { if attribs.iter().any(|data| data.enabled_as_array && data.buffer.is_none()) {
return Err(InvalidOperation);
}
let mut has_active_attrib = false;
let mut has_divisor_0 = false;
for active_info in active_attribs {
if active_info.location < 0 {
continue;
}
has_active_attrib = true;
let attrib = &attribs[active_info.location as usize];
if attrib.divisor == 0 {
has_divisor_0 = true;
}
if !attrib.enabled_as_array {
continue;
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.6
if required_len > 0 && instance_count > 0 {
let max_vertices = attrib.max_vertices();
if attrib.divisor == 0 {
if max_vertices < required_len {
return Err(InvalidOperation);
}
} else if max_vertices.checked_mul(attrib.divisor).map_or(false, |v| v < instance_count) {
return Err(InvalidOperation);
}
}
}
if has_active_attrib && !has_divisor_0 {
return Err(InvalidOperation); return Err(InvalidOperation);
} }
Ok(()) Ok(())
@ -3892,10 +4128,12 @@ pub struct VertexAttribData {
enabled_as_array: bool, enabled_as_array: bool,
size: u8, size: u8,
type_: u32, type_: u32,
bytes_per_vertex: u8,
normalized: bool, normalized: bool,
stride: u8, stride: u8,
offset: u32, offset: u32,
buffer: Option<Dom<WebGLBuffer>>, buffer: Option<Dom<WebGLBuffer>>,
divisor: u32,
} }
impl Default for VertexAttribData { impl Default for VertexAttribData {
@ -3905,10 +4143,12 @@ impl Default for VertexAttribData {
enabled_as_array: false, enabled_as_array: false,
size: 4, size: 4,
type_: constants::FLOAT, type_: constants::FLOAT,
bytes_per_vertex: 16,
normalized: false, normalized: false,
stride: 0, stride: 0,
offset: 0, offset: 0,
buffer: None, buffer: None,
divisor: 0,
} }
} }
} }
@ -3917,4 +4157,21 @@ impl VertexAttribData {
pub fn buffer(&self) -> Option<&WebGLBuffer> { pub fn buffer(&self) -> Option<&WebGLBuffer> {
self.buffer.as_ref().map(|b| &**b) self.buffer.as_ref().map(|b| &**b)
} }
fn max_vertices(&self) -> u32 {
let capacity = (self.buffer().unwrap().capacity() as u32).saturating_sub(self.offset);
if capacity < self.bytes_per_vertex as u32 {
0
} else if self.stride == 0 {
capacity / self.bytes_per_vertex as u32
} else if self.stride < self.bytes_per_vertex {
(capacity - (self.bytes_per_vertex - self.stride) as u32) / self.stride as u32
} else {
let mut max = capacity / self.stride as u32;
if capacity % self.stride as u32 >= self.bytes_per_vertex as u32 {
max += 1;
}
max
}
}
} }

View file

@ -18,7 +18,9 @@ use dom::webglobject::WebGLObject;
use dom::window::Window; use dom::window::Window;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use mozangle::shaders::{BuiltInResources, Output, ShaderValidator}; use mozangle::shaders::{BuiltInResources, Output, ShaderValidator};
use offscreen_gl_context::GLLimits;
use std::cell::Cell; use std::cell::Cell;
use std::os::raw::c_int;
use std::sync::{ONCE_INIT, Once}; use std::sync::{ONCE_INIT, Once};
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq)] #[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq)]
@ -33,8 +35,8 @@ pub struct WebGLShader {
webgl_object: WebGLObject, webgl_object: WebGLObject,
id: WebGLShaderId, id: WebGLShaderId,
gl_type: u32, gl_type: u32,
source: DomRefCell<Option<DOMString>>, source: DomRefCell<DOMString>,
info_log: DomRefCell<Option<String>>, info_log: DomRefCell<DOMString>,
is_deleted: Cell<bool>, is_deleted: Cell<bool>,
attached_counter: Cell<u32>, attached_counter: Cell<u32>,
compilation_status: Cell<ShaderCompilationStatus>, compilation_status: Cell<ShaderCompilationStatus>,
@ -54,8 +56,8 @@ impl WebGLShader {
webgl_object: WebGLObject::new_inherited(), webgl_object: WebGLObject::new_inherited(),
id: id, id: id,
gl_type: shader_type, gl_type: shader_type,
source: DomRefCell::new(None), source: Default::default(),
info_log: DomRefCell::new(None), info_log: Default::default(),
is_deleted: Cell::new(false), is_deleted: Cell::new(false),
attached_counter: Cell::new(0), attached_counter: Cell::new(0),
compilation_status: Cell::new(ShaderCompilationStatus::NotCompiled), compilation_status: Cell::new(ShaderCompilationStatus::NotCompiled),
@ -100,6 +102,7 @@ impl WebGLShader {
&self, &self,
webgl_version: WebGLVersion, webgl_version: WebGLVersion,
glsl_version: WebGLSLVersion, glsl_version: WebGLSLVersion,
limits: &GLLimits,
ext: &WebGLExtensions, ext: &WebGLExtensions,
) -> WebGLResult<()> { ) -> WebGLResult<()> {
if self.is_deleted.get() && !self.is_attached() { if self.is_deleted.get() && !self.is_attached() {
@ -110,15 +113,20 @@ impl WebGLShader {
} }
let source = self.source.borrow(); let source = self.source.borrow();
let source = match source.as_ref() {
Some(source) => source,
None => return Ok(()),
};
let mut params = BuiltInResources::default(); let params = BuiltInResources {
params.FragmentPrecisionHigh = 1; MaxVertexAttribs: limits.max_vertex_attribs as c_int,
params.OES_standard_derivatives = ext.is_enabled::<OESStandardDerivatives>() as i32; MaxVertexUniformVectors: limits.max_vertex_uniform_vectors as c_int,
params.EXT_shader_texture_lod = ext.is_enabled::<EXTShaderTextureLod>() as i32; MaxVaryingVectors: limits.max_varying_vectors as c_int,
MaxVertexTextureImageUnits: limits.max_vertex_texture_image_units as c_int,
MaxCombinedTextureImageUnits: limits.max_combined_texture_image_units as c_int,
MaxTextureImageUnits: limits.max_texture_image_units as c_int,
MaxFragmentUniformVectors: limits.max_fragment_uniform_vectors as c_int,
OES_standard_derivatives: ext.is_enabled::<OESStandardDerivatives>() as c_int,
EXT_shader_texture_lod: ext.is_enabled::<EXTShaderTextureLod>() as c_int,
FragmentPrecisionHigh: 1,
..BuiltInResources::default()
};
let validator = match webgl_version { let validator = match webgl_version {
WebGLVersion::WebGL1 => { WebGLVersion::WebGL1 => {
let output_format = if cfg!(any(target_os = "android", target_os = "ios")) { let output_format = if cfg!(any(target_os = "android", target_os = "ios")) {
@ -154,7 +162,7 @@ impl WebGLShader {
}, },
}; };
match validator.compile_and_translate(&[source]) { match validator.compile_and_translate(&[&source]) {
Ok(translated_source) => { Ok(translated_source) => {
debug!("Shader translated: {}", translated_source); debug!("Shader translated: {}", translated_source);
// NOTE: At this point we should be pretty sure that the compilation in the paint thread // NOTE: At this point we should be pretty sure that the compilation in the paint thread
@ -170,7 +178,7 @@ impl WebGLShader {
}, },
} }
*self.info_log.borrow_mut() = Some(validator.info_log()); *self.info_log.borrow_mut() = validator.info_log().into();
// TODO(emilio): More data (like uniform data) should be collected // TODO(emilio): More data (like uniform data) should be collected
// here to properly validate uniforms. // here to properly validate uniforms.
@ -208,18 +216,18 @@ impl WebGLShader {
} }
/// glGetShaderInfoLog /// glGetShaderInfoLog
pub fn info_log(&self) -> Option<String> { pub fn info_log(&self) -> DOMString {
self.info_log.borrow().clone() self.info_log.borrow().clone()
} }
/// Get the shader source /// Get the shader source
pub fn source(&self) -> Option<DOMString> { pub fn source(&self) -> DOMString {
self.source.borrow().clone() self.source.borrow().clone()
} }
/// glShaderSource /// glShaderSource
pub fn set_source(&self, source: DOMString) { pub fn set_source(&self, source: DOMString) {
*self.source.borrow_mut() = Some(source); *self.source.borrow_mut() = source;
} }
pub fn successfully_compiled(&self) -> bool { pub fn successfully_compiled(&self) -> bool {

View file

@ -0,0 +1,15 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* WebGL IDL definitions from the Khronos specification:
* https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
*/
[NoInterfaceObject]
interface ANGLEInstancedArrays {
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
void vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
};

View file

@ -502,9 +502,9 @@ interface WebGL2RenderingContextBase
// void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); // void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
/* Writing to the drawing buffer */ /* Writing to the drawing buffer */
// void vertexAttribDivisor(GLuint index, GLuint divisor); void vertexAttribDivisor(GLuint index, GLuint divisor);
// void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
// void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount); void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
// void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset); // void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
/* Reading back pixels */ /* Reading back pixels */

View file

@ -1,5 +0,0 @@
[gl-enable-vertex-attrib.html]
type: testharness
[WebGL test #1: getError expected: INVALID_OPERATION. Was NO_ERROR : ]
expected: FAIL

View file

@ -1,4 +1,5 @@
[gl-vertex-attrib-render.html] [gl-vertex-attrib-render.html]
bug: https://github.com/servo/servo/issues/21132
type: testharness type: testharness
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas] [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL expected: FAIL

View file

@ -1,4 +1,5 @@
[buffer-data-array-buffer-delete.html] [buffer-data-array-buffer-delete.html]
bug: https://github.com/servo/servo/issues/21132
type: testharness type: testharness
expected: ERROR expected: ERROR
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas] [WebGL test #0: Unable to fetch WebGL rendering context for Canvas]

View file

@ -1,5 +0,0 @@
[buffer-data-array-buffer.html]
type: testharness
[WebGL test #3: getError expected: INVALID_OPERATION. Was INVALID_VALUE : ]
expected: FAIL

View file

@ -1,4 +0,0 @@
[index-validation.html]
[WebGL test #12: getError expected: INVALID_OPERATION. Was NO_ERROR : ]
expected: FAIL

View file

@ -1,12 +1,4 @@
[drawingbuffer-static-canvas-test.html] [drawingbuffer-static-canvas-test.html]
type: testharness type: testharness
expected: ERROR expected: CRASH
[WebGL test #5: maxSize[0\] > 0 should be true. Threw exception TypeError: maxSize is null]
expected: FAIL
[WebGL test #6: maxSize[1\] > 0 should be true. Threw exception TypeError: maxSize is null]
expected: FAIL
[WebGL test #7: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,6 +1,4 @@
[drawingbuffer-test.html] [drawingbuffer-test.html]
type: testharness type: testharness
expected: ERROR expected: CRASH
[WebGL test #3: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,4 +1,5 @@
[incorrect-context-object-behaviour.html] [incorrect-context-object-behaviour.html]
bug: https://github.com/servo/servo/issues/21133
type: testharness type: testharness
[WebGL test #0: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: contextA.compileShader(shaderB)] [WebGL test #0: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: contextA.compileShader(shaderB)]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,26 @@
[angle-instanced-arrays-out-of-bounds.html]
bug: https://github.com/servo/servo/issues/20599
[WebGL test #175: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 1)]
expected: FAIL
[WebGL test #178: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 1)]
expected: FAIL
[WebGL test #180: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 2)]
expected: FAIL
[WebGL test #182: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 4)]
expected: FAIL
[WebGL test #183: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 10000)]
expected: FAIL
[WebGL test #184: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 0x7fffffff)]
expected: FAIL
[WebGL test #186: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 3)]
expected: FAIL
[WebGL test #188: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: ext.drawElementsInstancedANGLE(gl.TRIANGLES, 9, gl.UNSIGNED_BYTE, 0, 5)]
expected: FAIL

View file

@ -1,11 +0,0 @@
[ext-frag-depth.html]
type: testharness
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
[WebGL test #1: WebGL context does not exist]
expected: FAIL

View file

@ -1,8 +0,0 @@
[ext-sRGB.html]
type: testharness
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
[WebGL test #1: context does not exist]
expected: FAIL

View file

@ -1,5 +0,0 @@
[webgl-compressed-texture-atc.html]
type: testharness
[WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
expected: FAIL

View file

@ -1,5 +0,0 @@
[webgl-compressed-texture-pvrtc.html]
type: testharness
[WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
expected: FAIL

View file

@ -1,5 +0,0 @@
[webgl-compressed-texture-s3tc.html]
type: testharness
[WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
expected: FAIL

View file

@ -1,8 +0,0 @@
[large-loop-compile.html]
type: testharness
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
[WebGL test #1: context does not exist]
expected: FAIL

View file

@ -1,14 +0,0 @@
[functions-returning-strings.html]
type: testharness
[WebGL test #0: gl.getShaderSource(vs) should return a string. Returns: "null"]
expected: FAIL
[WebGL test #1: gl.getShaderInfoLog(vs) should return a string. Returns: "null"]
expected: FAIL
[WebGL test #4: gl.getShaderSource(fs) should return a string. Returns: "null"]
expected: FAIL
[WebGL test #5: gl.getShaderInfoLog(fs) should return a string. Returns: "null"]
expected: FAIL

View file

@ -1,14 +1,5 @@
[invalid-passed-params.html] [invalid-passed-params.html]
type: testharness type: testharness
[WebGL test #4: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.clear(desktopGL['ACCUM_BUFFER_BIT'\])]
expected: FAIL
[WebGL test #5: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.clear(desktopGL['ACCUM_BUFFER_BIT'\] | context.COLOR_BUFFER_BIT)]
expected: FAIL
[WebGL test #6: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.clear(desktopGL['ACCUM_BUFFER_BIT'\] | context.COLOR_BUFFER_BIT | context.DEPTH_BUFFER_BIT | context.STENCIL_BUFFER_BIT)]
expected: FAIL
[WebGL test #44: context.getError() should be 1281. Was 0.] [WebGL test #44: context.getError() should be 1281. Was 0.]
expected: FAIL expected: FAIL

View file

@ -1,7 +0,0 @@
[null-object-behaviour.html]
[WebGL test #3: getError expected: INVALID_VALUE. Was NO_ERROR : after evaluating: context.linkProgram(undefined)]
expected: FAIL
[WebGL test #38: getError expected: INVALID_OPERATION. Was INVALID_VALUE : after evaluating: context.bufferData(context.ARRAY_BUFFER, 1, context.STATIC_DRAW)]
expected: FAIL

View file

@ -1,3 +0,0 @@
[bindBufferBadArgs.html]
type: testharness
disabled: flaky

View file

@ -1,3 +0,0 @@
[bufferSubDataBadArgs.html]
type: testharness
disabled: flaky

View file

@ -1,6 +0,0 @@
[build_001_to_008.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13165
[WebGL test #0: expected compile success but it failed]
expected: FAIL

View file

@ -1,6 +0,0 @@
[build_009_to_016.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13165
[WebGL test #0: expected compile success but it failed]
expected: FAIL

View file

@ -1,3 +0,0 @@
[functions_025_to_032.html]
type: testharness
disabled: flaky

View file

@ -1,3 +0,0 @@
[functions_049_to_056.html]
type: testharness
disabled: flaky

View file

@ -1,4 +1,5 @@
[get-active-test.html] [get-active-test.html]
bug: https://github.com/servo/servo/issues/21133
type: testharness type: testharness
[WebGL test #31: context2.getActiveAttrib(program, 0) should be null. Was [object WebGLActiveInfo\].] [WebGL test #31: context2.getActiveAttrib(program, 0) should be null. Was [object WebGLActiveInfo\].]
expected: FAIL expected: FAIL

View file

@ -1,8 +0,0 @@
[gl-bind-attrib-location-long-names-test.html]
type: testharness
[WebGL test #4: at (0, 0) expected: 0,255,0,255 was 255,255,255,255]
expected: FAIL
[WebGL test #8: at (0, 0) expected: 255,0,0,255 was 0,0,0,255]
expected: FAIL

View file

@ -1,8 +0,0 @@
[gl-bind-attrib-location-test.html]
type: testharness
[WebGL test #7: at (20, 15) expected: 0,255,0,255 was 0,0,0,255]
expected: FAIL
[WebGL test #13: at (20, 15) expected: 255,0,0,255 was 0,0,0,255]
expected: FAIL

View file

@ -1,11 +1,5 @@
[feedback-loop.html] [feedback-loop.html]
type: testharness type: testharness
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after draw with invalid feedback loop] [WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after draw with invalid feedback loop]
expected: FAIL expected: FAIL

View file

@ -1,12 +1,3 @@
[renderbuffer-initialization.html] [renderbuffer-initialization.html]
type: testharness type: testharness
disabled: https://github.com/servo/servo/issues/13710 disabled: https://github.com/servo/servo/issues/13710
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,5 +0,0 @@
[draw-arrays-out-of-bounds.html]
type: testharness
[WebGL test #12: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: gl.drawArrays(gl.TRIANGLES, 3, 2)]
expected: FAIL

View file

@ -1,131 +0,0 @@
[gl-get-calls.html]
type: testharness
[WebGL test #3: (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[0\] <= 1) && (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[0\] > 0) && (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[1\] >= 1) should be true. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #4: (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[0\] <= 1) && (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[0\] > 0) && (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[1\] >= 1) should be true. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #5: context.getParameter(context.ALIASED_LINE_WIDTH_RANGE) is not an instance of Float32Array]
expected: FAIL
[WebGL test #6: context.getParameter(context.ALIASED_POINT_SIZE_RANGE) is not an instance of Float32Array]
expected: FAIL
[WebGL test #9: context.getParameter(context.BLEND_COLOR) should be 0,0,0,0. Was null.]
expected: FAIL
[WebGL test #10: context.getParameter(context.BLEND_COLOR) is not an instance of Float32Array]
expected: FAIL
[WebGL test #17: context.getParameter(context.COLOR_CLEAR_VALUE) should be 0,0,0,0. Was null.]
expected: FAIL
[WebGL test #18: context.getParameter(context.COLOR_CLEAR_VALUE) is not an instance of Float32Array]
expected: FAIL
[WebGL test #19: context.getParameter(context.COLOR_WRITEMASK) should be true,true,true,true. Was null.]
expected: FAIL
[WebGL test #20: context.getParameter(context.COMPRESSED_TEXTURE_FORMATS) is not an instance of Uint32Array]
expected: FAIL
[WebGL test #26: context.getParameter(context.DEPTH_RANGE) should be 0,1. Was null.]
expected: FAIL
[WebGL test #27: context.getParameter(context.DEPTH_RANGE) is not an instance of Float32Array]
expected: FAIL
[WebGL test #33: context.getParameter(context.GENERATE_MIPMAP_HINT) should be 4352 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #42: context.getParameter(context.SCISSOR_BOX)[0\] should be 0. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #43: context.getParameter(context.SCISSOR_BOX)[1\] should be 0. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #44: context.getParameter(context.SCISSOR_BOX)[2\] should be 2. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #45: context.getParameter(context.SCISSOR_BOX)[3\] should be 2. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #46: context.getParameter(context.SCISSOR_BOX) is not an instance of function Int32Array() {\n [native code\]\n}]
expected: FAIL
[WebGL test #47: context.getParameter(context.SCISSOR_TEST) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #88: context.getParameter(context.VIEWPORT) is not an instance of Int32Array]
expected: FAIL
[WebGL test #91: context.getParameter(context.MAX_FRAGMENT_UNIFORM_VECTORS) should be >= 16. Was null (of type object).]
expected: FAIL
[WebGL test #95: context.getParameter(context.MAX_VARYING_VECTORS) should be >= 8. Was null (of type object).]
expected: FAIL
[WebGL test #98: context.getParameter(context.MAX_VERTEX_UNIFORM_VECTORS) should be >= 128. Was null (of type object).]
expected: FAIL
[WebGL test #99: context.getParameter(context.MAX_VIEWPORT_DIMS)[0\] >= window.screen.width should be true. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #100: context.getParameter(context.MAX_VIEWPORT_DIMS)[1\] >= window.screen.height should be true. Threw exception TypeError: context.getParameter(...) is null]
expected: FAIL
[WebGL test #101: context.getParameter(context.MAX_VIEWPORT_DIMS) is not an instance of Int32Array]
expected: FAIL
[WebGL test #173: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #182: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #191: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #200: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #209: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #218: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #227: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #236: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #245: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #254: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #263: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #272: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #281: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #290: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #299: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #308: context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB) is not an instance of Float32Array]
expected: FAIL
[WebGL test #310: context.getError() should be 0. Was 1280.]
expected: FAIL

View file

@ -1,14 +1,5 @@
[texture-attachment-formats.html] [texture-attachment-formats.html]
type: testharness type: testharness
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #0: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL
[WebGL test #1: context does not exist]
expected: FAIL
[WebGL test #14: at (0, 0) expected: 63,63,63,255 was 64,0,0,255] [WebGL test #14: at (0, 0) expected: 63,63,63,255 was 64,0,0,255]
expected: FAIL expected: FAIL

View file

@ -113,159 +113,150 @@
[WebGL test #37: Property either does not exist or is not a function: vertexAttribIPointer] [WebGL test #37: Property either does not exist or is not a function: vertexAttribIPointer]
expected: FAIL expected: FAIL
[WebGL test #38: Property either does not exist or is not a function: vertexAttribDivisor] [WebGL test #38: Property either does not exist or is not a function: drawRangeElements]
expected: FAIL expected: FAIL
[WebGL test #39: Property either does not exist or is not a function: drawArraysInstanced] [WebGL test #39: Property either does not exist or is not a function: drawBuffers]
expected: FAIL expected: FAIL
[WebGL test #40: Property either does not exist or is not a function: drawElementsInstanced] [WebGL test #40: Property either does not exist or is not a function: clearBufferiv]
expected: FAIL expected: FAIL
[WebGL test #41: Property either does not exist or is not a function: drawRangeElements] [WebGL test #41: Property either does not exist or is not a function: clearBufferuiv]
expected: FAIL expected: FAIL
[WebGL test #42: Property either does not exist or is not a function: drawBuffers] [WebGL test #42: Property either does not exist or is not a function: clearBufferfv]
expected: FAIL expected: FAIL
[WebGL test #43: Property either does not exist or is not a function: clearBufferiv] [WebGL test #43: Property either does not exist or is not a function: clearBufferfi]
expected: FAIL expected: FAIL
[WebGL test #44: Property either does not exist or is not a function: clearBufferuiv] [WebGL test #44: Property either does not exist or is not a function: createQuery]
expected: FAIL expected: FAIL
[WebGL test #45: Property either does not exist or is not a function: clearBufferfv] [WebGL test #45: Property either does not exist or is not a function: deleteQuery]
expected: FAIL expected: FAIL
[WebGL test #46: Property either does not exist or is not a function: clearBufferfi] [WebGL test #46: Property either does not exist or is not a function: isQuery]
expected: FAIL expected: FAIL
[WebGL test #47: Property either does not exist or is not a function: createQuery] [WebGL test #47: Property either does not exist or is not a function: beginQuery]
expected: FAIL expected: FAIL
[WebGL test #48: Property either does not exist or is not a function: deleteQuery] [WebGL test #48: Property either does not exist or is not a function: endQuery]
expected: FAIL expected: FAIL
[WebGL test #49: Property either does not exist or is not a function: isQuery] [WebGL test #49: Property either does not exist or is not a function: getQuery]
expected: FAIL expected: FAIL
[WebGL test #50: Property either does not exist or is not a function: beginQuery] [WebGL test #50: Property either does not exist or is not a function: getQueryParameter]
expected: FAIL expected: FAIL
[WebGL test #51: Property either does not exist or is not a function: endQuery] [WebGL test #51: Property either does not exist or is not a function: createSampler]
expected: FAIL expected: FAIL
[WebGL test #52: Property either does not exist or is not a function: getQuery] [WebGL test #52: Property either does not exist or is not a function: deleteSampler]
expected: FAIL expected: FAIL
[WebGL test #53: Property either does not exist or is not a function: getQueryParameter] [WebGL test #53: Property either does not exist or is not a function: isSampler]
expected: FAIL expected: FAIL
[WebGL test #54: Property either does not exist or is not a function: createSampler] [WebGL test #54: Property either does not exist or is not a function: bindSampler]
expected: FAIL expected: FAIL
[WebGL test #55: Property either does not exist or is not a function: deleteSampler] [WebGL test #55: Property either does not exist or is not a function: samplerParameteri]
expected: FAIL expected: FAIL
[WebGL test #56: Property either does not exist or is not a function: isSampler] [WebGL test #56: Property either does not exist or is not a function: samplerParameterf]
expected: FAIL expected: FAIL
[WebGL test #57: Property either does not exist or is not a function: bindSampler] [WebGL test #57: Property either does not exist or is not a function: getSamplerParameter]
expected: FAIL expected: FAIL
[WebGL test #58: Property either does not exist or is not a function: samplerParameteri] [WebGL test #58: Property either does not exist or is not a function: fenceSync]
expected: FAIL expected: FAIL
[WebGL test #59: Property either does not exist or is not a function: samplerParameterf] [WebGL test #59: Property either does not exist or is not a function: isSync]
expected: FAIL expected: FAIL
[WebGL test #60: Property either does not exist or is not a function: getSamplerParameter] [WebGL test #60: Property either does not exist or is not a function: deleteSync]
expected: FAIL expected: FAIL
[WebGL test #61: Property either does not exist or is not a function: fenceSync] [WebGL test #61: Property either does not exist or is not a function: clientWaitSync]
expected: FAIL expected: FAIL
[WebGL test #62: Property either does not exist or is not a function: isSync] [WebGL test #62: Property either does not exist or is not a function: waitSync]
expected: FAIL expected: FAIL
[WebGL test #63: Property either does not exist or is not a function: deleteSync] [WebGL test #63: Property either does not exist or is not a function: getSyncParameter]
expected: FAIL expected: FAIL
[WebGL test #64: Property either does not exist or is not a function: clientWaitSync] [WebGL test #64: Property either does not exist or is not a function: createTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #65: Property either does not exist or is not a function: waitSync] [WebGL test #65: Property either does not exist or is not a function: deleteTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #66: Property either does not exist or is not a function: getSyncParameter] [WebGL test #66: Property either does not exist or is not a function: isTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #67: Property either does not exist or is not a function: createTransformFeedback] [WebGL test #67: Property either does not exist or is not a function: bindTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #68: Property either does not exist or is not a function: deleteTransformFeedback] [WebGL test #68: Property either does not exist or is not a function: beginTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #69: Property either does not exist or is not a function: isTransformFeedback] [WebGL test #69: Property either does not exist or is not a function: endTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #70: Property either does not exist or is not a function: bindTransformFeedback] [WebGL test #70: Property either does not exist or is not a function: transformFeedbackVaryings]
expected: FAIL expected: FAIL
[WebGL test #71: Property either does not exist or is not a function: beginTransformFeedback] [WebGL test #71: Property either does not exist or is not a function: getTransformFeedbackVarying]
expected: FAIL expected: FAIL
[WebGL test #72: Property either does not exist or is not a function: endTransformFeedback] [WebGL test #72: Property either does not exist or is not a function: pauseTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #73: Property either does not exist or is not a function: transformFeedbackVaryings] [WebGL test #73: Property either does not exist or is not a function: resumeTransformFeedback]
expected: FAIL expected: FAIL
[WebGL test #74: Property either does not exist or is not a function: getTransformFeedbackVarying] [WebGL test #74: Property either does not exist or is not a function: bindBufferBase]
expected: FAIL expected: FAIL
[WebGL test #75: Property either does not exist or is not a function: pauseTransformFeedback] [WebGL test #75: Property either does not exist or is not a function: bindBufferRange]
expected: FAIL expected: FAIL
[WebGL test #76: Property either does not exist or is not a function: resumeTransformFeedback] [WebGL test #76: Property either does not exist or is not a function: getIndexedParameter]
expected: FAIL expected: FAIL
[WebGL test #77: Property either does not exist or is not a function: bindBufferBase] [WebGL test #77: Property either does not exist or is not a function: getUniformIndices]
expected: FAIL expected: FAIL
[WebGL test #78: Property either does not exist or is not a function: bindBufferRange] [WebGL test #78: Property either does not exist or is not a function: getActiveUniforms]
expected: FAIL expected: FAIL
[WebGL test #79: Property either does not exist or is not a function: getIndexedParameter] [WebGL test #79: Property either does not exist or is not a function: getUniformBlockIndex]
expected: FAIL expected: FAIL
[WebGL test #80: Property either does not exist or is not a function: getUniformIndices] [WebGL test #80: Property either does not exist or is not a function: getActiveUniformBlockParameter]
expected: FAIL expected: FAIL
[WebGL test #81: Property either does not exist or is not a function: getActiveUniforms] [WebGL test #81: Property either does not exist or is not a function: getActiveUniformBlockName]
expected: FAIL expected: FAIL
[WebGL test #82: Property either does not exist or is not a function: getUniformBlockIndex] [WebGL test #82: Property either does not exist or is not a function: uniformBlockBinding]
expected: FAIL expected: FAIL
[WebGL test #83: Property either does not exist or is not a function: getActiveUniformBlockParameter] [WebGL test #83: Property either does not exist or is not a function: createVertexArray]
expected: FAIL expected: FAIL
[WebGL test #84: Property either does not exist or is not a function: getActiveUniformBlockName] [WebGL test #84: Property either does not exist or is not a function: deleteVertexArray]
expected: FAIL expected: FAIL
[WebGL test #85: Property either does not exist or is not a function: uniformBlockBinding] [WebGL test #85: Property either does not exist or is not a function: isVertexArray]
expected: FAIL expected: FAIL
[WebGL test #86: Property either does not exist or is not a function: createVertexArray] [WebGL test #86: Property either does not exist or is not a function: bindVertexArray]
expected: FAIL
[WebGL test #87: Property either does not exist or is not a function: deleteVertexArray]
expected: FAIL
[WebGL test #88: Property either does not exist or is not a function: isVertexArray]
expected: FAIL
[WebGL test #89: Property either does not exist or is not a function: bindVertexArray]
expected: FAIL expected: FAIL

View file

@ -1,53 +0,0 @@
[instanced-arrays.html]
expected: ERROR
[WebGL test #2: Default divisor of vertex attribute 0 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #3: Default divisor of vertex attribute 1 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #4: Default divisor of vertex attribute 2 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #5: Default divisor of vertex attribute 3 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #6: Default divisor of vertex attribute 4 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #7: Default divisor of vertex attribute 5 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #8: Default divisor of vertex attribute 6 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #9: Default divisor of vertex attribute 7 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #10: Default divisor of vertex attribute 8 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #11: Default divisor of vertex attribute 9 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #12: Default divisor of vertex attribute 10 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #13: Default divisor of vertex attribute 11 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #14: Default divisor of vertex attribute 12 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #15: Default divisor of vertex attribute 13 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #16: Default divisor of vertex attribute 14 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #17: Default divisor of vertex attribute 15 should be: 0, returned value was: null]
expected: FAIL
[WebGL test #18: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL