Auto merge of #26023 - mmatyas:webgl_fns_texstorage2d, r=jdm

Add support for WebGL2 TexStorage2D

Adds initial support for the WebGL2 `TexStorage2D` call, adds support for the related texture enums and enables some of the texture tests.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.6

<!-- Please describe your changes on the following line: -->

cc @jdm @zakorgy

A couple of notes:

- Currently `tests/wpt/webgl/meta/conformance2/textures` is disabled for testing; this patch enables the `misc` subdirectory and disables the rest, which is why there are so many new test files. The primary test for `TexStorage2D` is `conformance2/textures/misc/tex-storage-2d.html`.
- Most of the test passes, except the "texSubImage2D should succeed on immutable texture as long as the format is compatible" checks. This produces INVALID_OPERATIONs [here](d5e5414be3/components/script/dom/webglrenderingcontext.rs (L798)) because the texture's image info is not set at that level. I'm probably forgetting to call `set_image_infos_at_level` somewhere but I'm not sure where.
- There's a duplication of the internal texture format list with eg. the renderbuffer code, I wonder if there would be a good common place for it.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-04-30 10:13:18 -04:00 committed by GitHub
commit 2b20f04e8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 2056 additions and 677 deletions

View file

@ -1555,7 +1555,7 @@ impl WebGLImpl {
WebGLCommand::TexImage2D { WebGLCommand::TexImage2D {
target, target,
level, level,
effective_internal_format, internal_format,
size, size,
format, format,
data_type, data_type,
@ -1567,7 +1567,7 @@ impl WebGLImpl {
ref data, ref data,
} => { } => {
let pixels = prepare_pixels( let pixels = prepare_pixels(
format, internal_format,
data_type, data_type,
size, size,
unpacking_alignment, unpacking_alignment,
@ -1581,7 +1581,7 @@ impl WebGLImpl {
gl.tex_image_2d( gl.tex_image_2d(
target, target,
level as i32, level as i32,
effective_internal_format as i32, internal_format.as_gl_constant() as i32,
size.width as i32, size.width as i32,
size.height as i32, size.height as i32,
0, 0,
@ -1666,6 +1666,23 @@ impl WebGLImpl {
&*data, &*data,
); );
}, },
WebGLCommand::TexStorage2D(target, levels, internal_format, width, height) => gl
.tex_storage_2d(
target,
levels as i32,
internal_format.as_gl_constant(),
width as i32,
height as i32,
),
WebGLCommand::TexStorage3D(target, levels, internal_format, width, height, depth) => gl
.tex_storage_3d(
target,
levels as i32,
internal_format.as_gl_constant(),
width as i32,
height as i32,
depth as i32,
),
WebGLCommand::DrawingBufferWidth(ref sender) => { WebGLCommand::DrawingBufferWidth(ref sender) => {
let size = device let size = device
.context_surface_info(&ctx) .context_surface_info(&ctx)
@ -1822,6 +1839,11 @@ impl WebGLImpl {
.send(gl.get_tex_parameter_iv(target, param as u32)) .send(gl.get_tex_parameter_iv(target, param as u32))
.unwrap(); .unwrap();
}, },
WebGLCommand::GetTexParameterBool(target, param, ref sender) => {
sender
.send(gl.get_tex_parameter_iv(target, param as u32) != 0)
.unwrap();
},
WebGLCommand::GetInternalFormatIntVec(target, internal_format, param, ref sender) => { WebGLCommand::GetInternalFormatIntVec(target, internal_format, param, ref sender) => {
match param { match param {
InternalFormatIntVec::Samples => { InternalFormatIntVec::Samples => {
@ -2756,8 +2778,10 @@ fn image_to_tex_image_data(
} }
match (format, data_type) { match (format, data_type) {
(TexFormat::RGBA, TexDataType::UnsignedByte) => pixels, (TexFormat::RGBA, TexDataType::UnsignedByte) |
(TexFormat::RGB, TexDataType::UnsignedByte) => { (TexFormat::RGBA8, TexDataType::UnsignedByte) => pixels,
(TexFormat::RGB, TexDataType::UnsignedByte) |
(TexFormat::RGB8, TexDataType::UnsignedByte) => {
for i in 0..pixel_count { for i in 0..pixel_count {
let rgb = { let rgb = {
let rgb = &pixels[i * 4..i * 4 + 3]; let rgb = &pixels[i * 4..i * 4 + 3];
@ -2837,7 +2861,7 @@ fn image_to_tex_image_data(
pixels.truncate(pixel_count * 2); pixels.truncate(pixel_count * 2);
pixels pixels
}, },
(TexFormat::RGBA, TexDataType::Float) => { (TexFormat::RGBA, TexDataType::Float) | (TexFormat::RGBA32f, TexDataType::Float) => {
let mut rgbaf32 = Vec::<u8>::with_capacity(pixel_count * 16); let mut rgbaf32 = Vec::<u8>::with_capacity(pixel_count * 16);
for rgba8 in pixels.chunks(4) { for rgba8 in pixels.chunks(4) {
rgbaf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap(); rgbaf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
@ -2848,7 +2872,7 @@ fn image_to_tex_image_data(
rgbaf32 rgbaf32
}, },
(TexFormat::RGB, TexDataType::Float) => { (TexFormat::RGB, TexDataType::Float) | (TexFormat::RGB32f, TexDataType::Float) => {
let mut rgbf32 = Vec::<u8>::with_capacity(pixel_count * 12); let mut rgbf32 = Vec::<u8>::with_capacity(pixel_count * 12);
for rgba8 in pixels.chunks(4) { for rgba8 in pixels.chunks(4) {
rgbf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap(); rgbf32.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
@ -2858,7 +2882,7 @@ fn image_to_tex_image_data(
rgbf32 rgbf32
}, },
(TexFormat::Alpha, TexDataType::Float) => { (TexFormat::Alpha, TexDataType::Float) | (TexFormat::Alpha32f, TexDataType::Float) => {
for rgba8 in pixels.chunks_mut(4) { for rgba8 in pixels.chunks_mut(4) {
let p = rgba8[3] as f32; let p = rgba8[3] as f32;
NativeEndian::write_f32(rgba8, p); NativeEndian::write_f32(rgba8, p);
@ -2866,7 +2890,8 @@ fn image_to_tex_image_data(
pixels pixels
}, },
(TexFormat::Luminance, TexDataType::Float) => { (TexFormat::Luminance, TexDataType::Float) |
(TexFormat::Luminance32f, TexDataType::Float) => {
for rgba8 in pixels.chunks_mut(4) { for rgba8 in pixels.chunks_mut(4) {
let p = rgba8[0] as f32; let p = rgba8[0] as f32;
NativeEndian::write_f32(rgba8, p); NativeEndian::write_f32(rgba8, p);
@ -2874,7 +2899,8 @@ fn image_to_tex_image_data(
pixels pixels
}, },
(TexFormat::LuminanceAlpha, TexDataType::Float) => { (TexFormat::LuminanceAlpha, TexDataType::Float) |
(TexFormat::LuminanceAlpha32f, TexDataType::Float) => {
let mut data = Vec::<u8>::with_capacity(pixel_count * 8); let mut data = Vec::<u8>::with_capacity(pixel_count * 8);
for rgba8 in pixels.chunks(4) { for rgba8 in pixels.chunks(4) {
data.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap(); data.write_f32::<NativeEndian>(rgba8[0] as f32).unwrap();
@ -2883,7 +2909,8 @@ fn image_to_tex_image_data(
data data
}, },
(TexFormat::RGBA, TexDataType::HalfFloat) => { (TexFormat::RGBA, TexDataType::HalfFloat) |
(TexFormat::RGBA16f, TexDataType::HalfFloat) => {
let mut rgbaf16 = Vec::<u8>::with_capacity(pixel_count * 8); let mut rgbaf16 = Vec::<u8>::with_capacity(pixel_count * 8);
for rgba8 in pixels.chunks(4) { for rgba8 in pixels.chunks(4) {
rgbaf16 rgbaf16
@ -2902,7 +2929,7 @@ fn image_to_tex_image_data(
rgbaf16 rgbaf16
}, },
(TexFormat::RGB, TexDataType::HalfFloat) => { (TexFormat::RGB, TexDataType::HalfFloat) | (TexFormat::RGB16f, TexDataType::HalfFloat) => {
let mut rgbf16 = Vec::<u8>::with_capacity(pixel_count * 6); let mut rgbf16 = Vec::<u8>::with_capacity(pixel_count * 6);
for rgba8 in pixels.chunks(4) { for rgba8 in pixels.chunks(4) {
rgbf16 rgbf16
@ -2917,7 +2944,8 @@ fn image_to_tex_image_data(
} }
rgbf16 rgbf16
}, },
(TexFormat::Alpha, TexDataType::HalfFloat) => { (TexFormat::Alpha, TexDataType::HalfFloat) |
(TexFormat::Alpha16f, TexDataType::HalfFloat) => {
for i in 0..pixel_count { for i in 0..pixel_count {
let p = f16::from_f32(pixels[i * 4 + 3] as f32).as_bits(); let p = f16::from_f32(pixels[i * 4 + 3] as f32).as_bits();
NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p); NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p);
@ -2925,7 +2953,8 @@ fn image_to_tex_image_data(
pixels.truncate(pixel_count * 2); pixels.truncate(pixel_count * 2);
pixels pixels
}, },
(TexFormat::Luminance, TexDataType::HalfFloat) => { (TexFormat::Luminance, TexDataType::HalfFloat) |
(TexFormat::Luminance16f, TexDataType::HalfFloat) => {
for i in 0..pixel_count { for i in 0..pixel_count {
let p = f16::from_f32(pixels[i * 4] as f32).as_bits(); let p = f16::from_f32(pixels[i * 4] as f32).as_bits();
NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p); NativeEndian::write_u16(&mut pixels[i * 2..i * 2 + 2], p);
@ -2933,7 +2962,8 @@ fn image_to_tex_image_data(
pixels.truncate(pixel_count * 2); pixels.truncate(pixel_count * 2);
pixels pixels
}, },
(TexFormat::LuminanceAlpha, TexDataType::HalfFloat) => { (TexFormat::LuminanceAlpha, TexDataType::HalfFloat) |
(TexFormat::LuminanceAlpha16f, TexDataType::HalfFloat) => {
for rgba8 in pixels.chunks_mut(4) { for rgba8 in pixels.chunks_mut(4) {
let lum = f16::from_f32(rgba8[0] as f32).as_bits(); let lum = f16::from_f32(rgba8[0] as f32).as_bits();
let a = f16::from_f32(rgba8[3] as f32).as_bits(); let a = f16::from_f32(rgba8[3] as f32).as_bits();

View file

@ -111,7 +111,7 @@ pub struct WebGLCreateContextResult {
} }
/// Defines the WebGL version /// Defines the WebGL version
#[derive(Clone, Copy, Debug, Deserialize, Eq, MallocSizeOf, PartialEq, Serialize)] #[derive(Clone, Copy, Debug, Deserialize, Eq, MallocSizeOf, PartialEq, PartialOrd, Serialize)]
pub enum WebGLVersion { pub enum WebGLVersion {
/// https://www.khronos.org/registry/webgl/specs/1.0.2/ /// https://www.khronos.org/registry/webgl/specs/1.0.2/
/// Conforms closely to the OpenGL ES 2.0 API /// Conforms closely to the OpenGL ES 2.0 API
@ -384,8 +384,7 @@ pub enum WebGLCommand {
TexImage2D { TexImage2D {
target: u32, target: u32,
level: u32, level: u32,
// FIXME(nox): This should be computed on the WebGL thread. internal_format: TexFormat,
effective_internal_format: u32,
size: Size2D<u32>, size: Size2D<u32>,
format: TexFormat, format: TexFormat,
data_type: TexDataType, data_type: TexDataType,
@ -450,9 +449,12 @@ pub enum WebGLCommand {
GetCurrentVertexAttrib(u32, WebGLSender<[f32; 4]>), GetCurrentVertexAttrib(u32, WebGLSender<[f32; 4]>),
GetTexParameterFloat(u32, TexParameterFloat, WebGLSender<f32>), GetTexParameterFloat(u32, TexParameterFloat, WebGLSender<f32>),
GetTexParameterInt(u32, TexParameterInt, WebGLSender<i32>), GetTexParameterInt(u32, TexParameterInt, WebGLSender<i32>),
GetTexParameterBool(u32, TexParameterBool, WebGLSender<bool>),
GetInternalFormatIntVec(u32, u32, InternalFormatIntVec, WebGLSender<Vec<i32>>), GetInternalFormatIntVec(u32, u32, InternalFormatIntVec, WebGLSender<Vec<i32>>),
TexParameteri(u32, u32, i32), TexParameteri(u32, u32, i32),
TexParameterf(u32, u32, f32), TexParameterf(u32, u32, f32),
TexStorage2D(u32, u32, TexFormat, u32, u32),
TexStorage3D(u32, u32, TexFormat, u32, u32, u32),
DrawArrays { DrawArrays {
mode: u32, mode: u32,
first: i32, first: i32,
@ -872,11 +874,35 @@ parameters! {
TexParameter { TexParameter {
Float(TexParameterFloat { Float(TexParameterFloat {
TextureMaxAnisotropyExt = gl::TEXTURE_MAX_ANISOTROPY_EXT, TextureMaxAnisotropyExt = gl::TEXTURE_MAX_ANISOTROPY_EXT,
TextureMaxLod = gl::TEXTURE_MAX_LOD,
TextureMinLod = gl::TEXTURE_MIN_LOD,
}), }),
Int(TexParameterInt { Int(TexParameterInt {
TextureWrapS = gl::TEXTURE_WRAP_S, TextureWrapS = gl::TEXTURE_WRAP_S,
TextureWrapT = gl::TEXTURE_WRAP_T, TextureWrapT = gl::TEXTURE_WRAP_T,
TextureWrapR = gl::TEXTURE_WRAP_R,
TextureBaseLevel = gl::TEXTURE_BASE_LEVEL,
TextureMinFilter = gl::TEXTURE_MIN_FILTER,
TextureMagFilter = gl::TEXTURE_MAG_FILTER,
TextureMaxLevel = gl::TEXTURE_MAX_LEVEL,
TextureCompareFunc = gl::TEXTURE_COMPARE_FUNC,
TextureCompareMode = gl::TEXTURE_COMPARE_MODE,
TextureImmutableLevels = gl::TEXTURE_IMMUTABLE_LEVELS,
}), }),
Bool(TexParameterBool {
TextureImmutableFormat = gl::TEXTURE_IMMUTABLE_FORMAT,
}),
}
}
impl TexParameter {
pub fn required_webgl_version(self) -> WebGLVersion {
match self {
Self::Float(TexParameterFloat::TextureMaxAnisotropyExt) |
Self::Int(TexParameterInt::TextureWrapS) |
Self::Int(TexParameterInt::TextureWrapT) => WebGLVersion::WebGL1,
_ => WebGLVersion::WebGL2,
}
} }
} }
@ -931,30 +957,114 @@ mod gl_ext_constants {
COMPRESSED_RGBA_S3TC_DXT5_EXT, COMPRESSED_RGBA_S3TC_DXT5_EXT,
COMPRESSED_RGB_ETC1_WEBGL, COMPRESSED_RGB_ETC1_WEBGL,
]; ];
pub const ALPHA16F_ARB: u32 = 0x881C;
pub const ALPHA32F_ARB: u32 = 0x8816;
pub const LUMINANCE16F_ARB: u32 = 0x881E;
pub const LUMINANCE32F_ARB: u32 = 0x8818;
pub const LUMINANCE_ALPHA16F_ARB: u32 = 0x881F;
pub const LUMINANCE_ALPHA32F_ARB: u32 = 0x8819;
} }
gl_enums! { gl_enums! {
pub enum TexFormat { pub enum TexFormat {
DepthComponent = gl::DEPTH_COMPONENT, DepthComponent = gl::DEPTH_COMPONENT,
DepthStencil = gl::DEPTH_STENCIL,
Alpha = gl::ALPHA, Alpha = gl::ALPHA,
Alpha32f = gl_ext_constants::ALPHA32F_ARB,
Alpha16f = gl_ext_constants::ALPHA16F_ARB,
Red = gl::RED,
RedInteger = gl::RED_INTEGER,
RG = gl::RG,
RGInteger = gl::RG_INTEGER,
RGB = gl::RGB, RGB = gl::RGB,
RGBInteger = gl::RGB_INTEGER,
RGBA = gl::RGBA, RGBA = gl::RGBA,
RGBAInteger = gl::RGBA_INTEGER,
Luminance = gl::LUMINANCE, Luminance = gl::LUMINANCE,
LuminanceAlpha = gl::LUMINANCE_ALPHA, LuminanceAlpha = gl::LUMINANCE_ALPHA,
Luminance32f = gl_ext_constants::LUMINANCE32F_ARB,
Luminance16f = gl_ext_constants::LUMINANCE16F_ARB,
LuminanceAlpha32f = gl_ext_constants::LUMINANCE_ALPHA32F_ARB,
LuminanceAlpha16f = gl_ext_constants::LUMINANCE_ALPHA16F_ARB,
CompressedRgbS3tcDxt1 = gl_ext_constants::COMPRESSED_RGB_S3TC_DXT1_EXT, CompressedRgbS3tcDxt1 = gl_ext_constants::COMPRESSED_RGB_S3TC_DXT1_EXT,
CompressedRgbaS3tcDxt1 = gl_ext_constants::COMPRESSED_RGBA_S3TC_DXT1_EXT, CompressedRgbaS3tcDxt1 = gl_ext_constants::COMPRESSED_RGBA_S3TC_DXT1_EXT,
CompressedRgbaS3tcDxt3 = gl_ext_constants::COMPRESSED_RGBA_S3TC_DXT3_EXT, CompressedRgbaS3tcDxt3 = gl_ext_constants::COMPRESSED_RGBA_S3TC_DXT3_EXT,
CompressedRgbaS3tcDxt5 = gl_ext_constants::COMPRESSED_RGBA_S3TC_DXT5_EXT, CompressedRgbaS3tcDxt5 = gl_ext_constants::COMPRESSED_RGBA_S3TC_DXT5_EXT,
CompressedRgbEtc1 = gl_ext_constants::COMPRESSED_RGB_ETC1_WEBGL, CompressedRgbEtc1 = gl_ext_constants::COMPRESSED_RGB_ETC1_WEBGL,
R8 = gl::R8,
R8SNorm = gl::R8_SNORM,
R16f = gl::R16F,
R32f = gl::R32F,
R8ui = gl::R8UI,
R8i = gl::R8I,
R16ui = gl::R16UI,
R16i = gl::R16I,
R32ui = gl::R32UI,
R32i = gl::R32I,
RG8 = gl::RG8,
RG8SNorm = gl::RG8_SNORM,
RG16f = gl::RG16F,
RG32f = gl::RG32F,
RG8ui = gl::RG8UI,
RG8i = gl::RG8I,
RG16ui = gl::RG16UI,
RG16i = gl::RG16I,
RG32ui = gl::RG32UI,
RG32i = gl::RG32I,
RGB8 = gl::RGB8,
SRGB8 = gl::SRGB8,
RGB565 = gl::RGB565,
RGB8SNorm = gl::RGB8_SNORM,
R11fG11fB10f = gl::R11F_G11F_B10F,
RGB9E5 = gl::RGB9_E5,
RGB16f = gl::RGB16F,
RGB32f = gl::RGB32F,
RGB8ui = gl::RGB8UI,
RGB8i = gl::RGB8I,
RGB16ui = gl::RGB16UI,
RGB16i = gl::RGB16I,
RGB32ui = gl::RGB32UI,
RGB32i = gl::RGB32I,
RGBA8 = gl::RGBA8,
SRGB8Alpha8 = gl::SRGB8_ALPHA8,
RGBA8SNorm = gl::RGBA8_SNORM,
RGB5A1 = gl::RGB5_A1,
RGBA4 = gl::RGBA4,
RGB10A2 = gl::RGB10_A2,
RGBA16f = gl::RGBA16F,
RGBA32f = gl::RGBA32F,
RGBA8ui = gl::RGBA8UI,
RGBA8i = gl::RGBA8I,
RGB10A2ui = gl::RGB10_A2UI,
RGBA16ui = gl::RGBA16UI,
RGBA16i = gl::RGBA16I,
RGBA32i = gl::RGBA32I,
RGBA32ui = gl::RGBA32UI,
DepthComponent16 = gl::DEPTH_COMPONENT16,
DepthComponent24 = gl::DEPTH_COMPONENT24,
DepthComponent32f = gl::DEPTH_COMPONENT32F,
Depth24Stencil8 = gl::DEPTH24_STENCIL8,
Depth32fStencil8 = gl::DEPTH32F_STENCIL8,
} }
pub enum TexDataType { pub enum TexDataType {
Byte = gl::BYTE,
Int = gl::INT,
Short = gl::SHORT,
UnsignedByte = gl::UNSIGNED_BYTE, UnsignedByte = gl::UNSIGNED_BYTE,
UnsignedInt = gl::UNSIGNED_INT,
UnsignedInt10f11f11fRev = gl::UNSIGNED_INT_10F_11F_11F_REV,
UnsignedInt2101010Rev = gl::UNSIGNED_INT_2_10_10_10_REV,
UnsignedInt5999Rev = gl::UNSIGNED_INT_5_9_9_9_REV,
UnsignedInt248 = gl::UNSIGNED_INT_24_8,
UnsignedShort = gl::UNSIGNED_SHORT,
UnsignedShort4444 = gl::UNSIGNED_SHORT_4_4_4_4, UnsignedShort4444 = gl::UNSIGNED_SHORT_4_4_4_4,
UnsignedShort5551 = gl::UNSIGNED_SHORT_5_5_5_1, UnsignedShort5551 = gl::UNSIGNED_SHORT_5_5_5_1,
UnsignedShort565 = gl::UNSIGNED_SHORT_5_6_5, UnsignedShort565 = gl::UNSIGNED_SHORT_5_6_5,
Float = gl::FLOAT, Float = gl::FLOAT,
HalfFloat = gl::HALF_FLOAT_OES, HalfFloat = gl::HALF_FLOAT_OES,
Float32UnsignedInt248Rev = gl::FLOAT_32_UNSIGNED_INT_24_8_REV,
} }
} }
@ -962,13 +1072,12 @@ impl TexFormat {
/// Returns how many components does this format need. For example, RGBA /// Returns how many components does this format need. For example, RGBA
/// needs 4 components, while RGB requires 3. /// needs 4 components, while RGB requires 3.
pub fn components(&self) -> u32 { pub fn components(&self) -> u32 {
match *self { match self.to_unsized() {
TexFormat::DepthComponent => 1, TexFormat::DepthStencil => 2,
TexFormat::Alpha => 1,
TexFormat::Luminance => 1,
TexFormat::LuminanceAlpha => 2, TexFormat::LuminanceAlpha => 2,
TexFormat::RGB => 3, TexFormat::RG | TexFormat::RGInteger => 2,
TexFormat::RGBA => 4, TexFormat::RGB | TexFormat::RGBInteger => 3,
TexFormat::RGBA | TexFormat::RGBAInteger => 4,
_ => 1, _ => 1,
} }
} }
@ -977,6 +1086,220 @@ impl TexFormat {
pub fn is_compressed(&self) -> bool { pub fn is_compressed(&self) -> bool {
gl_ext_constants::COMPRESSIONS.contains(&self.as_gl_constant()) gl_ext_constants::COMPRESSIONS.contains(&self.as_gl_constant())
} }
/// Returns whether this format is a known sized or unsized format.
pub fn is_sized(&self) -> bool {
match self {
TexFormat::DepthComponent |
TexFormat::DepthStencil |
TexFormat::Alpha |
TexFormat::Red |
TexFormat::RG |
TexFormat::RGB |
TexFormat::RGBA |
TexFormat::Luminance |
TexFormat::LuminanceAlpha => false,
_ => true,
}
}
pub fn to_unsized(self) -> TexFormat {
match self {
TexFormat::R8 => TexFormat::Red,
TexFormat::R8SNorm => TexFormat::Red,
TexFormat::R16f => TexFormat::Red,
TexFormat::R32f => TexFormat::Red,
TexFormat::R8ui => TexFormat::RedInteger,
TexFormat::R8i => TexFormat::RedInteger,
TexFormat::R16ui => TexFormat::RedInteger,
TexFormat::R16i => TexFormat::RedInteger,
TexFormat::R32ui => TexFormat::RedInteger,
TexFormat::R32i => TexFormat::RedInteger,
TexFormat::RG8 => TexFormat::RG,
TexFormat::RG8SNorm => TexFormat::RG,
TexFormat::RG16f => TexFormat::RG,
TexFormat::RG32f => TexFormat::RG,
TexFormat::RG8ui => TexFormat::RGInteger,
TexFormat::RG8i => TexFormat::RGInteger,
TexFormat::RG16ui => TexFormat::RGInteger,
TexFormat::RG16i => TexFormat::RGInteger,
TexFormat::RG32ui => TexFormat::RGInteger,
TexFormat::RG32i => TexFormat::RGInteger,
TexFormat::RGB8 => TexFormat::RGB,
TexFormat::SRGB8 => TexFormat::RGB,
TexFormat::RGB565 => TexFormat::RGB,
TexFormat::RGB8SNorm => TexFormat::RGB,
TexFormat::R11fG11fB10f => TexFormat::RGB,
TexFormat::RGB9E5 => TexFormat::RGB,
TexFormat::RGB16f => TexFormat::RGB,
TexFormat::RGB32f => TexFormat::RGB,
TexFormat::RGB8ui => TexFormat::RGBInteger,
TexFormat::RGB8i => TexFormat::RGBInteger,
TexFormat::RGB16ui => TexFormat::RGBInteger,
TexFormat::RGB16i => TexFormat::RGBInteger,
TexFormat::RGB32ui => TexFormat::RGBInteger,
TexFormat::RGB32i => TexFormat::RGBInteger,
TexFormat::RGBA8 => TexFormat::RGBA,
TexFormat::SRGB8Alpha8 => TexFormat::RGBA,
TexFormat::RGBA8SNorm => TexFormat::RGBA,
TexFormat::RGB5A1 => TexFormat::RGBA,
TexFormat::RGBA4 => TexFormat::RGBA,
TexFormat::RGB10A2 => TexFormat::RGBA,
TexFormat::RGBA16f => TexFormat::RGBA,
TexFormat::RGBA32f => TexFormat::RGBA,
TexFormat::RGBA8ui => TexFormat::RGBAInteger,
TexFormat::RGBA8i => TexFormat::RGBAInteger,
TexFormat::RGB10A2ui => TexFormat::RGBAInteger,
TexFormat::RGBA16ui => TexFormat::RGBAInteger,
TexFormat::RGBA16i => TexFormat::RGBAInteger,
TexFormat::RGBA32i => TexFormat::RGBAInteger,
TexFormat::RGBA32ui => TexFormat::RGBAInteger,
TexFormat::DepthComponent16 => TexFormat::DepthComponent,
TexFormat::DepthComponent24 => TexFormat::DepthComponent,
TexFormat::DepthComponent32f => TexFormat::DepthComponent,
TexFormat::Depth24Stencil8 => TexFormat::DepthStencil,
TexFormat::Depth32fStencil8 => TexFormat::DepthStencil,
TexFormat::Alpha32f => TexFormat::Alpha,
TexFormat::Alpha16f => TexFormat::Alpha,
TexFormat::Luminance32f => TexFormat::Luminance,
TexFormat::Luminance16f => TexFormat::Luminance,
TexFormat::LuminanceAlpha32f => TexFormat::LuminanceAlpha,
TexFormat::LuminanceAlpha16f => TexFormat::LuminanceAlpha,
_ => self,
}
}
pub fn compatible_data_types(self) -> &'static [TexDataType] {
match self {
TexFormat::RGB => &[
TexDataType::UnsignedByte,
TexDataType::UnsignedShort565,
TexDataType::Float,
TexDataType::HalfFloat,
][..],
TexFormat::RGBA => &[
TexDataType::UnsignedByte,
TexDataType::UnsignedShort4444,
TexDataType::UnsignedShort5551,
TexDataType::Float,
TexDataType::HalfFloat,
][..],
TexFormat::LuminanceAlpha => &[
TexDataType::UnsignedByte,
TexDataType::Float,
TexDataType::HalfFloat,
][..],
TexFormat::Luminance => &[
TexDataType::UnsignedByte,
TexDataType::Float,
TexDataType::HalfFloat,
][..],
TexFormat::Alpha => &[
TexDataType::UnsignedByte,
TexDataType::Float,
TexDataType::HalfFloat,
][..],
TexFormat::LuminanceAlpha32f => &[TexDataType::Float][..],
TexFormat::LuminanceAlpha16f => &[TexDataType::HalfFloat][..],
TexFormat::Luminance32f => &[TexDataType::Float][..],
TexFormat::Luminance16f => &[TexDataType::HalfFloat][..],
TexFormat::Alpha32f => &[TexDataType::Float][..],
TexFormat::Alpha16f => &[TexDataType::HalfFloat][..],
TexFormat::R8 => &[TexDataType::UnsignedByte][..],
TexFormat::R8SNorm => &[TexDataType::Byte][..],
TexFormat::R16f => &[TexDataType::HalfFloat, TexDataType::Float][..],
TexFormat::R32f => &[TexDataType::Float][..],
TexFormat::R8ui => &[TexDataType::UnsignedByte][..],
TexFormat::R8i => &[TexDataType::Byte][..],
TexFormat::R16ui => &[TexDataType::UnsignedShort][..],
TexFormat::R16i => &[TexDataType::Short][..],
TexFormat::R32ui => &[TexDataType::UnsignedInt][..],
TexFormat::R32i => &[TexDataType::Int][..],
TexFormat::RG8 => &[TexDataType::UnsignedByte][..],
TexFormat::RG8SNorm => &[TexDataType::Byte][..],
TexFormat::RG16f => &[TexDataType::HalfFloat, TexDataType::Float][..],
TexFormat::RG32f => &[TexDataType::Float][..],
TexFormat::RG8ui => &[TexDataType::UnsignedByte][..],
TexFormat::RG8i => &[TexDataType::Byte][..],
TexFormat::RG16ui => &[TexDataType::UnsignedShort][..],
TexFormat::RG16i => &[TexDataType::Short][..],
TexFormat::RG32ui => &[TexDataType::UnsignedInt][..],
TexFormat::RG32i => &[TexDataType::Int][..],
TexFormat::RGB8 => &[TexDataType::UnsignedByte][..],
TexFormat::SRGB8 => &[TexDataType::UnsignedByte][..],
TexFormat::RGB565 => &[TexDataType::UnsignedByte, TexDataType::UnsignedShort565][..],
TexFormat::RGB8SNorm => &[TexDataType::Byte][..],
TexFormat::R11fG11fB10f => &[
TexDataType::UnsignedInt10f11f11fRev,
TexDataType::HalfFloat,
TexDataType::Float,
][..],
TexFormat::RGB9E5 => &[
TexDataType::UnsignedInt5999Rev,
TexDataType::HalfFloat,
TexDataType::Float,
][..],
TexFormat::RGB16f => &[TexDataType::HalfFloat, TexDataType::Float][..],
TexFormat::RGB32f => &[TexDataType::Float][..],
TexFormat::RGB8ui => &[TexDataType::UnsignedByte][..],
TexFormat::RGB8i => &[TexDataType::Byte][..],
TexFormat::RGB16ui => &[TexDataType::UnsignedShort][..],
TexFormat::RGB16i => &[TexDataType::Short][..],
TexFormat::RGB32ui => &[TexDataType::UnsignedInt][..],
TexFormat::RGB32i => &[TexDataType::Int][..],
TexFormat::RGBA8 => &[TexDataType::UnsignedByte][..],
TexFormat::SRGB8Alpha8 => &[TexDataType::UnsignedByte][..],
TexFormat::RGBA8SNorm => &[TexDataType::Byte][..],
TexFormat::RGB5A1 => &[
TexDataType::UnsignedByte,
TexDataType::UnsignedShort5551,
TexDataType::UnsignedInt2101010Rev,
][..],
TexFormat::RGBA4 => &[TexDataType::UnsignedByte, TexDataType::UnsignedShort4444][..],
TexFormat::RGB10A2 => &[TexDataType::UnsignedInt2101010Rev][..],
TexFormat::RGBA16f => &[TexDataType::HalfFloat, TexDataType::Float][..],
TexFormat::RGBA32f => &[TexDataType::Float][..],
TexFormat::RGBA8ui => &[TexDataType::UnsignedByte][..],
TexFormat::RGBA8i => &[TexDataType::Byte][..],
TexFormat::RGB10A2ui => &[TexDataType::UnsignedInt2101010Rev][..],
TexFormat::RGBA16ui => &[TexDataType::UnsignedShort][..],
TexFormat::RGBA16i => &[TexDataType::Short][..],
TexFormat::RGBA32i => &[TexDataType::Int][..],
TexFormat::RGBA32ui => &[TexDataType::UnsignedInt][..],
TexFormat::DepthComponent16 => {
&[TexDataType::UnsignedShort, TexDataType::UnsignedInt][..]
},
TexFormat::DepthComponent24 => &[TexDataType::UnsignedInt][..],
TexFormat::DepthComponent32f => &[TexDataType::Float][..],
TexFormat::Depth24Stencil8 => &[TexDataType::UnsignedInt248][..],
TexFormat::Depth32fStencil8 => &[TexDataType::Float32UnsignedInt248Rev][..],
TexFormat::CompressedRgbS3tcDxt1 |
TexFormat::CompressedRgbaS3tcDxt1 |
TexFormat::CompressedRgbaS3tcDxt3 |
TexFormat::CompressedRgbaS3tcDxt5 => &[TexDataType::UnsignedByte][..],
_ => &[][..],
}
}
pub fn required_webgl_version(self) -> WebGLVersion {
match self {
TexFormat::DepthComponent |
TexFormat::Alpha |
TexFormat::RGB |
TexFormat::RGBA |
TexFormat::Luminance |
TexFormat::LuminanceAlpha |
TexFormat::CompressedRgbS3tcDxt1 |
TexFormat::CompressedRgbaS3tcDxt1 |
TexFormat::CompressedRgbaS3tcDxt3 |
TexFormat::CompressedRgbaS3tcDxt5 => WebGLVersion::WebGL1,
_ => WebGLVersion::WebGL2,
}
}
pub fn usable_as_internal(self) -> bool {
!self.compatible_data_types().is_empty()
}
} }
impl TexDataType { impl TexDataType {
@ -984,12 +1307,21 @@ impl TexDataType {
pub fn element_size(&self) -> u32 { pub fn element_size(&self) -> u32 {
use self::*; use self::*;
match *self { match *self {
TexDataType::UnsignedByte => 1, TexDataType::Byte | TexDataType::UnsignedByte => 1,
TexDataType::Short |
TexDataType::UnsignedShort |
TexDataType::UnsignedShort4444 | TexDataType::UnsignedShort4444 |
TexDataType::UnsignedShort5551 | TexDataType::UnsignedShort5551 |
TexDataType::UnsignedShort565 => 2, TexDataType::UnsignedShort565 => 2,
TexDataType::Int |
TexDataType::UnsignedInt |
TexDataType::UnsignedInt10f11f11fRev |
TexDataType::UnsignedInt2101010Rev |
TexDataType::UnsignedInt5999Rev => 4,
TexDataType::UnsignedInt248 => 4,
TexDataType::Float => 4, TexDataType::Float => 4,
TexDataType::HalfFloat => 2, TexDataType::HalfFloat => 2,
TexDataType::Float32UnsignedInt248Rev => 4,
} }
} }
@ -997,12 +1329,34 @@ impl TexDataType {
/// UnsignedShort4444 holds four components, each with 4 bits of data. /// UnsignedShort4444 holds four components, each with 4 bits of data.
pub fn components_per_element(&self) -> u32 { pub fn components_per_element(&self) -> u32 {
match *self { match *self {
TexDataType::Byte => 1,
TexDataType::UnsignedByte => 1, TexDataType::UnsignedByte => 1,
TexDataType::Short => 1,
TexDataType::UnsignedShort => 1,
TexDataType::UnsignedShort565 => 3, TexDataType::UnsignedShort565 => 3,
TexDataType::UnsignedShort5551 => 4, TexDataType::UnsignedShort5551 => 4,
TexDataType::UnsignedShort4444 => 4, TexDataType::UnsignedShort4444 => 4,
TexDataType::Int => 1,
TexDataType::UnsignedInt => 1,
TexDataType::UnsignedInt10f11f11fRev => 3,
TexDataType::UnsignedInt2101010Rev => 4,
TexDataType::UnsignedInt5999Rev => 4,
TexDataType::UnsignedInt248 => 2,
TexDataType::Float => 1, TexDataType::Float => 1,
TexDataType::HalfFloat => 1, TexDataType::HalfFloat => 1,
TexDataType::Float32UnsignedInt248Rev => 2,
}
}
pub fn required_webgl_version(self) -> WebGLVersion {
match self {
TexDataType::UnsignedByte |
TexDataType::UnsignedShort4444 |
TexDataType::UnsignedShort5551 |
TexDataType::UnsignedShort565 |
TexDataType::Float |
TexDataType::HalfFloat => WebGLVersion::WebGL1,
_ => WebGLVersion::WebGL2,
} }
} }
} }

View file

@ -18,6 +18,8 @@ use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom};
use crate::dom::bindings::str::DOMString; use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlcanvaselement::HTMLCanvasElement; use crate::dom::htmlcanvaselement::HTMLCanvasElement;
use crate::dom::webgl_validations::tex_image_2d::{TexStorageValidator, TexStorageValidatorResult};
use crate::dom::webgl_validations::WebGLValidator;
use crate::dom::webglactiveinfo::WebGLActiveInfo; use crate::dom::webglactiveinfo::WebGLActiveInfo;
use crate::dom::webglbuffer::WebGLBuffer; use crate::dom::webglbuffer::WebGLBuffer;
use crate::dom::webglframebuffer::{WebGLFramebuffer, WebGLFramebufferAttachmentRoot}; use crate::dom::webglframebuffer::{WebGLFramebuffer, WebGLFramebufferAttachmentRoot};
@ -838,6 +840,55 @@ impl WebGL2RenderingContext {
self.base self.base
.send_command(WebGLCommand::VertexAttribU(index, x, y, z, w)); .send_command(WebGLCommand::VertexAttribU(index, x, y, z, w));
} }
fn tex_storage(
&self,
dimensions: u8,
target: u32,
levels: i32,
internal_format: u32,
width: i32,
height: i32,
depth: i32,
) {
let expected_dimensions = match target {
constants::TEXTURE_2D | constants::TEXTURE_CUBE_MAP => 2,
constants::TEXTURE_3D | constants::TEXTURE_2D_ARRAY => 3,
_ => return self.base.webgl_error(InvalidEnum),
};
if dimensions != expected_dimensions {
return self.base.webgl_error(InvalidEnum);
}
let validator = TexStorageValidator::new(
&self.base,
dimensions,
target,
levels,
internal_format,
width,
height,
depth,
);
let TexStorageValidatorResult {
texture,
target,
levels,
internal_format,
width,
height,
depth,
} = match validator.validate() {
Ok(result) => result,
Err(_) => return, // NB: The validator sets the correct error for us.
};
handle_potential_webgl_error!(
self.base,
texture.storage(target, levels, internal_format, width, height, depth),
return
);
}
} }
impl WebGL2RenderingContextMethods for WebGL2RenderingContext { impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
@ -4138,6 +4189,31 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
self.base.send_command(WebGLCommand::DrawBuffers(buffers)); self.base.send_command(WebGLCommand::DrawBuffers(buffers));
} }
} }
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.6
fn TexStorage2D(
&self,
target: u32,
levels: i32,
internal_format: u32,
width: i32,
height: i32,
) {
self.tex_storage(2, target, levels, internal_format, width, height, 1)
}
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.6
fn TexStorage3D(
&self,
target: u32,
levels: i32,
internal_format: u32,
width: i32,
height: i32,
depth: i32,
) {
self.tex_storage(3, target, levels, internal_format, width, height, depth)
}
} }
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> { impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> {

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use super::{ext_constants, WebGLExtension, WebGLExtensionSpec, WebGLExtensions}; use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions};
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
pub mod angleinstancedarrays; pub mod angleinstancedarrays;

View file

@ -2,13 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use super::{ use super::{constants as webgl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions};
constants as webgl, ext_constants as gl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions,
};
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::webglrenderingcontext::WebGLRenderingContext; use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use canvas_traits::webgl::WebGLVersion; use canvas_traits::webgl::{TexFormat, WebGLVersion};
use dom_struct::dom_struct; use dom_struct::dom_struct;
#[dom_struct] #[dom_struct]
@ -44,14 +42,18 @@ impl WebGLExtension for OESTextureFloat {
fn enable(ext: &WebGLExtensions) { fn enable(ext: &WebGLExtensions) {
ext.enable_tex_type(webgl::FLOAT); ext.enable_tex_type(webgl::FLOAT);
ext.add_effective_tex_internal_format(webgl::RGBA, webgl::FLOAT, gl::RGBA32F); ext.add_effective_tex_internal_format(TexFormat::RGBA, webgl::FLOAT, TexFormat::RGBA32f);
ext.add_effective_tex_internal_format(webgl::RGB, webgl::FLOAT, gl::RGB32F); ext.add_effective_tex_internal_format(TexFormat::RGB, webgl::FLOAT, TexFormat::RGB32f);
ext.add_effective_tex_internal_format(webgl::LUMINANCE, webgl::FLOAT, gl::LUMINANCE32F_ARB);
ext.add_effective_tex_internal_format(webgl::ALPHA, webgl::FLOAT, gl::ALPHA32F_ARB);
ext.add_effective_tex_internal_format( ext.add_effective_tex_internal_format(
webgl::LUMINANCE_ALPHA, TexFormat::Luminance,
webgl::FLOAT, webgl::FLOAT,
gl::LUMINANCE_ALPHA32F_ARB, TexFormat::Luminance32f,
);
ext.add_effective_tex_internal_format(TexFormat::Alpha, webgl::FLOAT, TexFormat::Alpha32f);
ext.add_effective_tex_internal_format(
TexFormat::LuminanceAlpha,
webgl::FLOAT,
TexFormat::LuminanceAlpha32f,
); );
} }

View file

@ -2,14 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use super::{ use super::{WebGLExtension, WebGLExtensionSpec, WebGLExtensions};
constants as webgl, ext_constants as gl, WebGLExtension, WebGLExtensionSpec, WebGLExtensions,
};
use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants; use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::webglrenderingcontext::WebGLRenderingContext; use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use canvas_traits::webgl::WebGLVersion; use canvas_traits::webgl::{TexFormat, WebGLVersion};
use dom_struct::dom_struct; use dom_struct::dom_struct;
#[dom_struct] #[dom_struct]
@ -50,14 +48,14 @@ impl WebGLExtension for OESTextureHalfFloat {
fn enable(ext: &WebGLExtensions) { fn enable(ext: &WebGLExtensions) {
let hf = OESTextureHalfFloatConstants::HALF_FLOAT_OES; let hf = OESTextureHalfFloatConstants::HALF_FLOAT_OES;
ext.enable_tex_type(hf); ext.enable_tex_type(hf);
ext.add_effective_tex_internal_format(webgl::RGBA, hf, gl::RGBA16F); ext.add_effective_tex_internal_format(TexFormat::RGBA, hf, TexFormat::RGBA16f);
ext.add_effective_tex_internal_format(webgl::RGB, hf, gl::RGB16F); ext.add_effective_tex_internal_format(TexFormat::RGB, hf, TexFormat::RGB16f);
ext.add_effective_tex_internal_format(webgl::LUMINANCE, hf, gl::LUMINANCE16F_ARB); ext.add_effective_tex_internal_format(TexFormat::Luminance, hf, TexFormat::Luminance16f);
ext.add_effective_tex_internal_format(webgl::ALPHA, hf, gl::ALPHA16F_ARB); ext.add_effective_tex_internal_format(TexFormat::Alpha, hf, TexFormat::Alpha16f);
ext.add_effective_tex_internal_format( ext.add_effective_tex_internal_format(
webgl::LUMINANCE_ALPHA, TexFormat::LuminanceAlpha,
hf, hf,
gl::LUMINANCE_ALPHA16F_ARB, TexFormat::LuminanceAlpha16f,
); );
} }

View file

@ -18,7 +18,7 @@ use crate::dom::oestexturehalffloat::OESTextureHalfFloat;
use crate::dom::webglcolorbufferfloat::WEBGLColorBufferFloat; use crate::dom::webglcolorbufferfloat::WEBGLColorBufferFloat;
use crate::dom::webglrenderingcontext::WebGLRenderingContext; use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use crate::dom::webgltexture::TexCompression; use crate::dom::webgltexture::TexCompression;
use canvas_traits::webgl::{GlType, WebGLVersion}; use canvas_traits::webgl::{GlType, TexFormat, WebGLVersion};
use fnv::{FnvHashMap, FnvHashSet}; use fnv::{FnvHashMap, FnvHashSet};
use js::jsapi::JSObject; use js::jsapi::JSObject;
use malloc_size_of::MallocSizeOf; use malloc_size_of::MallocSizeOf;
@ -82,7 +82,7 @@ struct WebGLExtensionFeatures {
gl_extensions: FnvHashSet<String>, gl_extensions: FnvHashSet<String>,
disabled_tex_types: FnvHashSet<GLenum>, disabled_tex_types: FnvHashSet<GLenum>,
not_filterable_tex_types: FnvHashSet<GLenum>, not_filterable_tex_types: FnvHashSet<GLenum>,
effective_tex_internal_formats: FnvHashMap<TexFormatType, u32>, effective_tex_internal_formats: FnvHashMap<TexFormatType, TexFormat>,
/// WebGL Hint() targets enabled by extensions. /// WebGL Hint() targets enabled by extensions.
hint_targets: FnvHashSet<GLenum>, hint_targets: FnvHashSet<GLenum>,
/// WebGL GetParameter() names enabled by extensions. /// WebGL GetParameter() names enabled by extensions.
@ -273,9 +273,9 @@ impl WebGLExtensions {
pub fn add_effective_tex_internal_format( pub fn add_effective_tex_internal_format(
&self, &self,
source_internal_format: u32, source_internal_format: TexFormat,
source_data_type: u32, source_data_type: u32,
effective_internal_format: u32, effective_internal_format: TexFormat,
) { ) {
let format = TexFormatType(source_internal_format, source_data_type); let format = TexFormatType(source_internal_format, source_data_type);
self.features self.features
@ -286,9 +286,9 @@ impl WebGLExtensions {
pub fn get_effective_tex_internal_format( pub fn get_effective_tex_internal_format(
&self, &self,
source_internal_format: u32, source_internal_format: TexFormat,
source_data_type: u32, source_data_type: u32,
) -> u32 { ) -> TexFormat {
let format = TexFormatType(source_internal_format, source_data_type); let format = TexFormatType(source_internal_format, source_data_type);
*(self *(self
.features .features
@ -453,4 +453,4 @@ impl WebGLExtensions {
// Helper structs // Helper structs
#[derive(Eq, Hash, JSTraceable, MallocSizeOf, PartialEq)] #[derive(Eq, Hash, JSTraceable, MallocSizeOf, PartialEq)]
struct TexFormatType(u32, u32); struct TexFormatType(TexFormat, u32);

View file

@ -7,20 +7,6 @@ mod extension;
mod extensions; mod extensions;
mod wrapper; mod wrapper;
// Some extra constants not exposed in WebGLRenderingContext constants
pub mod ext_constants {
pub const ALPHA16F_ARB: u32 = 0x881C;
pub const ALPHA32F_ARB: u32 = 0x8816;
pub const LUMINANCE16F_ARB: u32 = 0x881E;
pub const LUMINANCE32F_ARB: u32 = 0x8818;
pub const LUMINANCE_ALPHA16F_ARB: u32 = 0x881F;
pub const LUMINANCE_ALPHA32F_ARB: u32 = 0x8819;
pub const RGBA16F: u32 = 0x881A;
pub const RGB16F: u32 = 0x881B;
pub const RGBA32F: u32 = 0x8814;
pub const RGB32F: u32 = 0x8815;
}
pub use self::extension::WebGLExtension; pub use self::extension::WebGLExtension;
pub use self::extension::WebGLExtensionSpec; pub use self::extension::WebGLExtensionSpec;
pub use self::extensions::WebGLExtensions; pub use self::extensions::WebGLExtensions;

View file

@ -9,7 +9,7 @@ use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use crate::dom::webgltexture::{ImageInfo, WebGLTexture}; use crate::dom::webgltexture::{ImageInfo, WebGLTexture};
use crate::dom::webgltexture::{TexCompression, TexCompressionValidation}; use crate::dom::webgltexture::{TexCompression, TexCompressionValidation};
use canvas_traits::webgl::{TexDataType, TexFormat, WebGLError::*}; use canvas_traits::webgl::{TexDataType, TexFormat, WebGLError::*};
use std::{self, fmt}; use std::{self, cmp, fmt};
/// The errors that the texImage* family of functions can generate. /// The errors that the texImage* family of functions can generate.
#[derive(Debug)] #[derive(Debug)]
@ -24,6 +24,10 @@ pub enum TexImageValidationError {
NegativeLevel, NegativeLevel,
/// A level too high to be allowed by the implementation was passed. /// A level too high to be allowed by the implementation was passed.
LevelTooHigh, LevelTooHigh,
/// A level less than an allowed minimal value was passed.
LevelTooLow,
/// A depth less than an allowed minimal value was passed.
DepthTooLow,
/// A negative width and height was passed. /// A negative width and height was passed.
NegativeDimension, NegativeDimension,
/// A bigger with and height were passed than what the implementation /// A bigger with and height were passed than what the implementation
@ -60,6 +64,8 @@ impl fmt::Display for TexImageValidationError {
}, },
NegativeLevel => "A negative level was passed", NegativeLevel => "A negative level was passed",
LevelTooHigh => "Level too high", LevelTooHigh => "Level too high",
LevelTooLow => "Level too low",
DepthTooLow => "Depth too low",
NegativeDimension => "Negative dimensions were passed", NegativeDimension => "Negative dimensions were passed",
TextureTooBig => "Dimensions given are too big", TextureTooBig => "Dimensions given are too big",
InvalidDataType => "Invalid data type", InvalidDataType => "Invalid data type",
@ -108,8 +114,8 @@ impl<'a> WebGLValidator for CommonTexImage2DValidator<'a> {
// GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, // GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
// GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z. // GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
let target = match TexImageTarget::from_gl_constant(self.target) { let target = match TexImageTarget::from_gl_constant(self.target) {
Some(target) => target, Some(target) if target.dimensions() == 2 => target,
None => { _ => {
self.context.webgl_error(InvalidEnum); self.context.webgl_error(InvalidEnum);
return Err(TexImageValidationError::InvalidTextureTarget(self.target)); return Err(TexImageValidationError::InvalidTextureTarget(self.target));
}, },
@ -140,8 +146,13 @@ impl<'a> WebGLValidator for CommonTexImage2DValidator<'a> {
// GL_INVALID_ENUM is generated if internal_format is not an accepted // GL_INVALID_ENUM is generated if internal_format is not an accepted
// format. // format.
let internal_format = match TexFormat::from_gl_constant(self.internal_format) { let internal_format = match TexFormat::from_gl_constant(self.internal_format) {
Some(format) => format, Some(format)
None => { if format.required_webgl_version() <= self.context.webgl_version() &&
format.usable_as_internal() =>
{
format
},
_ => {
self.context.webgl_error(InvalidEnum); self.context.webgl_error(InvalidEnum);
return Err(TexImageValidationError::InvalidTextureFormat); return Err(TexImageValidationError::InvalidTextureFormat);
}, },
@ -278,6 +289,7 @@ pub struct TexImage2DValidatorResult {
pub border: u32, pub border: u32,
pub texture: DomRoot<WebGLTexture>, pub texture: DomRoot<WebGLTexture>,
pub target: TexImageTarget, pub target: TexImageTarget,
pub internal_format: TexFormat,
pub format: TexFormat, pub format: TexFormat,
pub data_type: TexDataType, pub data_type: TexDataType,
} }
@ -303,16 +315,18 @@ impl<'a> WebGLValidator for TexImage2DValidator<'a> {
// GL_INVALID_ENUM is generated if format or data_type is not an // GL_INVALID_ENUM is generated if format or data_type is not an
// accepted value. // accepted value.
let data_type = match TexDataType::from_gl_constant(self.data_type) { let data_type = match TexDataType::from_gl_constant(self.data_type) {
Some(data_type) => data_type, Some(data_type) if data_type.required_webgl_version() <= context.webgl_version() => {
None => { data_type
},
_ => {
context.webgl_error(InvalidEnum); context.webgl_error(InvalidEnum);
return Err(TexImageValidationError::InvalidDataType); return Err(TexImageValidationError::InvalidDataType);
}, },
}; };
let format = match TexFormat::from_gl_constant(self.format) { let format = match TexFormat::from_gl_constant(self.format) {
Some(format) => format, Some(format) if format.required_webgl_version() <= context.webgl_version() => format,
None => { _ => {
context.webgl_error(InvalidEnum); context.webgl_error(InvalidEnum);
return Err(TexImageValidationError::InvalidTextureFormat); return Err(TexImageValidationError::InvalidTextureFormat);
}, },
@ -320,11 +334,16 @@ impl<'a> WebGLValidator for TexImage2DValidator<'a> {
// GL_INVALID_OPERATION is generated if format does not match // GL_INVALID_OPERATION is generated if format does not match
// internal_format. // internal_format.
if format != internal_format { if format != internal_format.to_unsized() {
context.webgl_error(InvalidOperation); context.webgl_error(InvalidOperation);
return Err(TexImageValidationError::TextureFormatMismatch); return Err(TexImageValidationError::TextureFormatMismatch);
} }
// NOTE: In WebGL2 data type check should be done based on the internal
// format, but in some functions this validator is called with the
// regular unsized format as parameter (eg. TexSubImage2D). For now
// it's left here to avoid duplication.
//
// GL_INVALID_OPERATION is generated if type is // GL_INVALID_OPERATION is generated if type is
// GL_UNSIGNED_SHORT_4_4_4_4 or GL_UNSIGNED_SHORT_5_5_5_1 and format is // GL_UNSIGNED_SHORT_4_4_4_4 or GL_UNSIGNED_SHORT_5_5_5_1 and format is
// not GL_RGBA. // not GL_RGBA.
@ -352,6 +371,7 @@ impl<'a> WebGLValidator for TexImage2DValidator<'a> {
border: border, border: border,
texture: texture, texture: texture,
target: target, target: target,
internal_format: internal_format,
format: format, format: format,
data_type: data_type, data_type: data_type,
}) })
@ -657,3 +677,113 @@ impl<'a> WebGLValidator for CompressedTexSubImage2DValidator<'a> {
}) })
} }
} }
pub struct TexStorageValidator<'a> {
common_validator: CommonTexImage2DValidator<'a>,
dimensions: u8,
depth: i32,
}
pub struct TexStorageValidatorResult {
pub texture: DomRoot<WebGLTexture>,
pub target: TexImageTarget,
pub levels: u32,
pub internal_format: TexFormat,
pub width: u32,
pub height: u32,
pub depth: u32,
}
impl<'a> TexStorageValidator<'a> {
pub fn new(
context: &'a WebGLRenderingContext,
dimensions: u8,
target: u32,
levels: i32,
internal_format: u32,
width: i32,
height: i32,
depth: i32,
) -> Self {
TexStorageValidator {
common_validator: CommonTexImage2DValidator::new(
context,
target,
levels,
internal_format,
width,
height,
0,
),
dimensions,
depth,
}
}
}
impl<'a> WebGLValidator for TexStorageValidator<'a> {
type Error = TexImageValidationError;
type ValidatedOutput = TexStorageValidatorResult;
fn validate(self) -> Result<Self::ValidatedOutput, TexImageValidationError> {
let context = self.common_validator.context;
let CommonTexImage2DValidatorResult {
texture,
target,
level,
internal_format,
width,
height,
border: _,
} = self.common_validator.validate()?;
if self.depth < 1 {
context.webgl_error(InvalidValue);
return Err(TexImageValidationError::DepthTooLow);
}
if level < 1 {
context.webgl_error(InvalidValue);
return Err(TexImageValidationError::LevelTooLow);
}
let dimensions_valid = match target {
TexImageTarget::Texture2D | TexImageTarget::CubeMap => self.dimensions == 2,
TexImageTarget::Texture3D | TexImageTarget::Texture2DArray => self.dimensions == 3,
_ => false,
};
if !dimensions_valid {
context.webgl_error(InvalidEnum);
return Err(TexImageValidationError::InvalidTextureTarget(
target.as_gl_constant(),
));
}
if !internal_format.is_sized() {
context.webgl_error(InvalidEnum);
return Err(TexImageValidationError::InvalidTextureFormat);
}
let max_level = log2(cmp::max(width, height) as u32) + 1;
if level > max_level {
context.webgl_error(InvalidOperation);
return Err(TexImageValidationError::LevelTooHigh);
}
if texture.target().is_none() {
context.webgl_error(InvalidOperation);
return Err(TexImageValidationError::TextureTargetNotBound(
target.as_gl_constant(),
));
}
Ok(TexStorageValidatorResult {
texture,
target,
levels: level,
internal_format,
width,
height,
depth: self.depth as u32,
})
}
}

View file

@ -2,18 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants; use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants;
use canvas_traits::gl_enums; use canvas_traits::gl_enums;
gl_enums! { gl_enums! {
pub enum TexImageTarget { pub enum TexImageTarget {
Texture2D = WebGLRenderingContextConstants::TEXTURE_2D, Texture2D = constants::TEXTURE_2D,
CubeMapPositiveX = WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_POSITIVE_X, Texture2DArray = constants::TEXTURE_2D_ARRAY,
CubeMapNegativeX = WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_NEGATIVE_X, Texture3D = constants::TEXTURE_3D,
CubeMapPositiveY = WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_POSITIVE_Y, CubeMap = constants::TEXTURE_CUBE_MAP,
CubeMapNegativeY = WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_NEGATIVE_Y, CubeMapPositiveX = constants::TEXTURE_CUBE_MAP_POSITIVE_X,
CubeMapPositiveZ = WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_POSITIVE_Z, CubeMapNegativeX = constants::TEXTURE_CUBE_MAP_NEGATIVE_X,
CubeMapNegativeZ = WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_NEGATIVE_Z, CubeMapPositiveY = constants::TEXTURE_CUBE_MAP_POSITIVE_Y,
CubeMapNegativeY = constants::TEXTURE_CUBE_MAP_NEGATIVE_Y,
CubeMapPositiveZ = constants::TEXTURE_CUBE_MAP_POSITIVE_Z,
CubeMapNegativeZ = constants::TEXTURE_CUBE_MAP_NEGATIVE_Z,
} }
} }
@ -24,4 +27,11 @@ impl TexImageTarget {
_ => true, _ => true,
} }
} }
pub fn dimensions(self) -> u8 {
match self {
TexImageTarget::Texture3D | TexImageTarget::Texture2DArray => 3,
_ => 2,
}
}
} }

View file

@ -6,6 +6,7 @@ use crate::dom::bindings::cell::{DomRefCell, Ref, RefMut};
use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants; use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
use crate::dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants; use crate::dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants;
use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants; use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants;
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::TexImageSource; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::TexImageSource;
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes;
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
@ -353,7 +354,7 @@ impl WebGLRenderingContext {
// Send a command to re-bind the TEXTURE_2D, if any. // Send a command to re-bind the TEXTURE_2D, if any.
if let Some(texture) = self if let Some(texture) = self
.textures .textures
.active_texture_slot(constants::TEXTURE_2D) .active_texture_slot(constants::TEXTURE_2D, self.webgl_version())
.unwrap() .unwrap()
.get() .get()
{ {
@ -477,8 +478,12 @@ impl WebGLRenderingContext {
} }
fn tex_parameter(&self, target: u32, param: u32, value: TexParameterValue) { fn tex_parameter(&self, target: u32, param: u32, value: TexParameterValue) {
let texture_slot = let texture_slot = handle_potential_webgl_error!(
handle_potential_webgl_error!(self, self.textures.active_texture_slot(target), return); self,
self.textures
.active_texture_slot(target, self.webgl_version()),
return
);
let texture = let texture =
handle_potential_webgl_error!(self, texture_slot.get().ok_or(InvalidOperation), return); handle_potential_webgl_error!(self, texture_slot.get().ok_or(InvalidOperation), return);
@ -567,7 +572,7 @@ impl WebGLRenderingContext {
texture: &WebGLTexture, texture: &WebGLTexture,
target: TexImageTarget, target: TexImageTarget,
level: u32, level: u32,
format: TexFormat, internal_format: TexFormat,
size: Size2D<u32>, size: Size2D<u32>,
data_type: TexDataType, data_type: TexDataType,
) -> bool { ) -> bool {
@ -595,7 +600,8 @@ impl WebGLRenderingContext {
texture, texture,
target, target,
data_type, data_type,
format, internal_format,
internal_format.to_unsized(),
level, level,
0, 0,
1, 1,
@ -707,12 +713,16 @@ impl WebGLRenderingContext {
// or UNSIGNED_SHORT_5_5_5_1, a Uint16Array must be supplied. // or UNSIGNED_SHORT_5_5_5_1, a Uint16Array must be supplied.
// or FLOAT, a Float32Array must be supplied. // or FLOAT, a Float32Array must be supplied.
// If the types do not match, an INVALID_OPERATION error is generated. // If the types do not match, an INVALID_OPERATION error is generated.
let is_webgl2 = self.webgl_version() == WebGLVersion::WebGL2;
let received_size = match *data { let received_size = match *data {
None => element_size, None => element_size,
Some(ref buffer) => match buffer.get_array_type() { Some(ref buffer) => match buffer.get_array_type() {
Type::Uint8 => 1, Type::Uint8 => 1,
Type::Uint16 => 2, Type::Uint16 => 2,
Type::Float32 => 4, Type::Float32 => 4,
Type::Int8 if is_webgl2 => 1,
Type::Int16 if is_webgl2 => 2,
Type::Int32 | Type::Uint32 if is_webgl2 => 4,
_ => { _ => {
self.webgl_error(InvalidOperation); self.webgl_error(InvalidOperation);
return Err(()); return Err(());
@ -744,6 +754,7 @@ impl WebGLRenderingContext {
texture: &WebGLTexture, texture: &WebGLTexture,
target: TexImageTarget, target: TexImageTarget,
data_type: TexDataType, data_type: TexDataType,
internal_format: TexFormat,
format: TexFormat, format: TexFormat,
level: u32, level: u32,
_border: u32, _border: u32,
@ -779,9 +790,10 @@ impl WebGLRenderingContext {
YAxisTreatment::AsIs YAxisTreatment::AsIs
}; };
let effective_internal_format = self let internal_format = self
.extension_manager .extension_manager
.get_effective_tex_internal_format(format.as_gl_constant(), data_type.as_gl_constant()); .get_effective_tex_internal_format(internal_format, data_type.as_gl_constant());
let effective_data_type = self let effective_data_type = self
.extension_manager .extension_manager
.effective_type(data_type.as_gl_constant()); .effective_type(data_type.as_gl_constant());
@ -790,7 +802,7 @@ impl WebGLRenderingContext {
self.send_command(WebGLCommand::TexImage2D { self.send_command(WebGLCommand::TexImage2D {
target: target.as_gl_constant(), target: target.as_gl_constant(),
level, level,
effective_internal_format, internal_format,
size: pixels.size, size: pixels.size,
format, format,
data_type, data_type,
@ -837,11 +849,19 @@ impl WebGLRenderingContext {
return self.webgl_error(InvalidValue); return self.webgl_error(InvalidValue);
} }
// NB: format and internal_format must match. // The unsized format must be compatible with the sized internal format
if format != image_info.internal_format() || data_type != image_info.data_type().unwrap() { debug_assert!(!format.is_sized());
if format != image_info.internal_format().to_unsized() {
return self.webgl_error(InvalidOperation); return self.webgl_error(InvalidOperation);
} }
// See https://www.khronos.org/registry/webgl/specs/latest/2.0/#4.1.6
if self.webgl_version() == WebGLVersion::WebGL1 {
if data_type != image_info.data_type().unwrap() {
return self.webgl_error(InvalidOperation);
}
}
let settings = self.texture_unpacking_settings.get(); let settings = self.texture_unpacking_settings.get();
let dest_premultiplied = settings.contains(TextureUnpacking::PREMULTIPLY_ALPHA); let dest_premultiplied = settings.contains(TextureUnpacking::PREMULTIPLY_ALPHA);
@ -1572,6 +1592,10 @@ impl WebGLRenderingContext {
Err(_) => return, Err(_) => return,
}; };
if texture.is_immutable() {
return self.webgl_error(InvalidOperation);
}
let size = Size2D::new(width, height); let size = Size2D::new(width, height);
let buff = IpcSharedMemory::from_bytes(data); let buff = IpcSharedMemory::from_bytes(data);
let pixels = TexPixels::from_array(buff, size); let pixels = TexPixels::from_array(buff, size);
@ -1987,7 +2011,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
constants::TEXTURE_BINDING_2D => unsafe { constants::TEXTURE_BINDING_2D => unsafe {
let texture = self let texture = self
.textures .textures
.active_texture_slot(constants::TEXTURE_2D) .active_texture_slot(constants::TEXTURE_2D, self.webgl_version())
.unwrap() .unwrap()
.get(); .get();
return optional_root_object_to_js_or_null!(*cx, texture); return optional_root_object_to_js_or_null!(*cx, texture);
@ -1995,7 +2019,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
constants::TEXTURE_BINDING_CUBE_MAP => unsafe { constants::TEXTURE_BINDING_CUBE_MAP => unsafe {
let texture = self let texture = self
.textures .textures
.active_texture_slot(constants::TEXTURE_CUBE_MAP) .active_texture_slot(constants::TEXTURE_CUBE_MAP, self.webgl_version())
.unwrap() .unwrap()
.get(); .get();
return optional_root_object_to_js_or_null!(*cx, texture); return optional_root_object_to_js_or_null!(*cx, texture);
@ -2182,7 +2206,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
fn GetTexParameter(&self, _cx: SafeJSContext, target: u32, pname: u32) -> JSVal { fn GetTexParameter(&self, _cx: SafeJSContext, target: u32, pname: u32) -> JSVal {
let texture_slot = handle_potential_webgl_error!( let texture_slot = handle_potential_webgl_error!(
self, self,
self.textures.active_texture_slot(target), self.textures
.active_texture_slot(target, self.webgl_version()),
return NullValue() return NullValue()
); );
let texture = handle_potential_webgl_error!( let texture = handle_potential_webgl_error!(
@ -2205,8 +2230,22 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
_ => {}, _ => {},
} }
match handle_potential_webgl_error!(self, TexParameter::from_u32(pname), return NullValue()) let texparam =
{ handle_potential_webgl_error!(self, TexParameter::from_u32(pname), return NullValue());
if self.webgl_version() < texparam.required_webgl_version() {
self.webgl_error(InvalidEnum);
return NullValue();
}
if let Some(value) = texture.maybe_get_tex_parameter(texparam) {
match value {
TexParameterValue::Float(v) => return DoubleValue(v as f64),
TexParameterValue::Int(v) => return Int32Value(v),
TexParameterValue::Bool(v) => return BooleanValue(v),
}
}
match texparam {
TexParameter::Float(param) => { TexParameter::Float(param) => {
let (sender, receiver) = webgl_channel().unwrap(); let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetTexParameterFloat(target, param, sender)); self.send_command(WebGLCommand::GetTexParameterFloat(target, param, sender));
@ -2217,6 +2256,11 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
self.send_command(WebGLCommand::GetTexParameterInt(target, param, sender)); self.send_command(WebGLCommand::GetTexParameterInt(target, param, sender));
Int32Value(receiver.recv().unwrap()) Int32Value(receiver.recv().unwrap())
}, },
TexParameter::Bool(param) => {
let (sender, receiver) = webgl_channel().unwrap();
self.send_command(WebGLCommand::GetTexParameterBool(target, param, sender));
BooleanValue(receiver.recv().unwrap())
},
} }
} }
@ -2431,8 +2475,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
handle_potential_webgl_error!(self, self.validate_ownership(texture), return); handle_potential_webgl_error!(self, self.validate_ownership(texture), return);
} }
let texture_slot = let texture_slot = handle_potential_webgl_error!(
handle_potential_webgl_error!(self, self.textures.active_texture_slot(target), return); self,
self.textures
.active_texture_slot(target, self.webgl_version()),
return
);
if let Some(texture) = texture { if let Some(texture) = texture {
handle_potential_webgl_error!(self, texture.bind(target), return); handle_potential_webgl_error!(self, texture.bind(target), return);
@ -2444,8 +2492,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8 // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
fn GenerateMipmap(&self, target: u32) { fn GenerateMipmap(&self, target: u32) {
let texture_slot = let texture_slot = handle_potential_webgl_error!(
handle_potential_webgl_error!(self, self.textures.active_texture_slot(target), return); self,
self.textures
.active_texture_slot(target, self.webgl_version()),
return
);
let texture = let texture =
handle_potential_webgl_error!(self, texture_slot.get().ok_or(InvalidOperation), return); handle_potential_webgl_error!(self, texture_slot.get().ok_or(InvalidOperation), return);
handle_potential_webgl_error!(self, texture.generate_mipmap()); handle_potential_webgl_error!(self, texture.generate_mipmap());
@ -2543,6 +2595,10 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Err(_) => return, Err(_) => return,
}; };
if texture.is_immutable() {
return self.webgl_error(InvalidOperation);
}
let framebuffer_format = match self.bound_draw_framebuffer.get() { let framebuffer_format = match self.bound_draw_framebuffer.get() {
Some(fb) => match fb.attachment(constants::COLOR_ATTACHMENT0) { Some(fb) => match fb.attachment(constants::COLOR_ATTACHMENT0) {
Some(WebGLFramebufferAttachmentRoot::Renderbuffer(rb)) => { Some(WebGLFramebufferAttachmentRoot::Renderbuffer(rb)) => {
@ -4203,6 +4259,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
height, height,
level, level,
border, border,
internal_format,
format, format,
data_type, data_type,
} = match validator.validate() { } = match validator.validate() {
@ -4210,6 +4267,13 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Err(_) => return Ok(()), // NB: The validator sets the correct error for us. Err(_) => return Ok(()), // NB: The validator sets the correct error for us.
}; };
if !internal_format.compatible_data_types().contains(&data_type) {
return Ok(self.webgl_error(InvalidOperation));
}
if texture.is_immutable() {
return Ok(self.webgl_error(InvalidOperation));
}
let unpacking_alignment = self.texture_unpacking_alignment.get(); let unpacking_alignment = self.texture_unpacking_alignment.get();
let expected_byte_length = match { let expected_byte_length = match {
@ -4245,7 +4309,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
let size = Size2D::new(width, height); let size = Size2D::new(width, height);
if !self.validate_filterable_texture(&texture, target, level, format, size, data_type) { if !self.validate_filterable_texture(
&texture,
target,
level,
internal_format,
size,
data_type,
) {
// FIXME(nox): What is the spec for this? No error is emitted ever // FIXME(nox): What is the spec for this? No error is emitted ever
// by validate_filterable_texture. // by validate_filterable_texture.
return Ok(()); return Ok(());
@ -4255,6 +4326,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
&texture, &texture,
target, target,
data_type, data_type,
internal_format,
format, format,
level, level,
border, border,
@ -4301,6 +4373,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
target, target,
level, level,
border, border,
internal_format,
format, format,
data_type, data_type,
.. ..
@ -4309,11 +4382,18 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
Err(_) => return Ok(()), // NB: The validator sets the correct error for us. Err(_) => return Ok(()), // NB: The validator sets the correct error for us.
}; };
if !internal_format.compatible_data_types().contains(&data_type) {
return Ok(self.webgl_error(InvalidOperation));
}
if texture.is_immutable() {
return Ok(self.webgl_error(InvalidOperation));
}
if !self.validate_filterable_texture( if !self.validate_filterable_texture(
&texture, &texture,
target, target,
level, level,
format, internal_format,
pixels.size, pixels.size,
data_type, data_type,
) { ) {
@ -4323,7 +4403,15 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
} }
self.tex_image_2d( self.tex_image_2d(
&texture, target, data_type, format, level, border, 1, pixels, &texture,
target,
data_type,
internal_format,
format,
level,
border,
1,
pixels,
); );
Ok(()) Ok(())
} }
@ -4354,7 +4442,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
let texture = handle_potential_webgl_error!( let texture = handle_potential_webgl_error!(
self, self,
self.textures self.textures
.active_texture_slot(constants::TEXTURE_2D) .active_texture_slot(constants::TEXTURE_2D, self.webgl_version())
.unwrap() .unwrap()
.get() .get()
.ok_or(InvalidOperation), .ok_or(InvalidOperation),
@ -4721,11 +4809,20 @@ impl Textures {
Ok(()) Ok(())
} }
fn active_texture_slot(&self, target: u32) -> WebGLResult<&MutNullableDom<WebGLTexture>> { pub fn active_texture_slot(
&self,
target: u32,
webgl_version: WebGLVersion,
) -> WebGLResult<&MutNullableDom<WebGLTexture>> {
let active_unit = self.active_unit(); let active_unit = self.active_unit();
let is_webgl2 = webgl_version == WebGLVersion::WebGL2;
match target { match target {
constants::TEXTURE_2D => Ok(&active_unit.tex_2d), constants::TEXTURE_2D => Ok(&active_unit.tex_2d),
constants::TEXTURE_CUBE_MAP => Ok(&active_unit.tex_cube_map), constants::TEXTURE_CUBE_MAP => Ok(&active_unit.tex_cube_map),
WebGL2RenderingContextConstants::TEXTURE_2D_ARRAY if is_webgl2 => {
Ok(&active_unit.tex_2d_array)
},
WebGL2RenderingContextConstants::TEXTURE_3D if is_webgl2 => Ok(&active_unit.tex_3d),
_ => Err(InvalidEnum), _ => Err(InvalidEnum),
} }
} }
@ -4737,6 +4834,9 @@ impl Textures {
let active_unit = self.active_unit(); let active_unit = self.active_unit();
match target { match target {
TexImageTarget::Texture2D => active_unit.tex_2d.get(), TexImageTarget::Texture2D => active_unit.tex_2d.get(),
TexImageTarget::Texture2DArray => active_unit.tex_2d_array.get(),
TexImageTarget::Texture3D => active_unit.tex_3d.get(),
TexImageTarget::CubeMap |
TexImageTarget::CubeMapPositiveX | TexImageTarget::CubeMapPositiveX |
TexImageTarget::CubeMapNegativeX | TexImageTarget::CubeMapNegativeX |
TexImageTarget::CubeMapPositiveY | TexImageTarget::CubeMapPositiveY |
@ -4763,6 +4863,8 @@ impl Textures {
struct TextureUnit { struct TextureUnit {
tex_2d: MutNullableDom<WebGLTexture>, tex_2d: MutNullableDom<WebGLTexture>,
tex_cube_map: MutNullableDom<WebGLTexture>, tex_cube_map: MutNullableDom<WebGLTexture>,
tex_2d_array: MutNullableDom<WebGLTexture>,
tex_3d: MutNullableDom<WebGLTexture>,
} }
impl TextureUnit { impl TextureUnit {
@ -4770,6 +4872,11 @@ impl TextureUnit {
let fields = [ let fields = [
(&self.tex_2d, constants::TEXTURE_2D), (&self.tex_2d, constants::TEXTURE_2D),
(&self.tex_cube_map, constants::TEXTURE_CUBE_MAP), (&self.tex_cube_map, constants::TEXTURE_CUBE_MAP),
(
&self.tex_2d_array,
WebGL2RenderingContextConstants::TEXTURE_2D_ARRAY,
),
(&self.tex_3d, WebGL2RenderingContextConstants::TEXTURE_3D),
]; ];
for &(slot, target) in &fields { for &(slot, target) in &fields {
if slot.get().map_or(false, |t| texture == &*t) { if slot.get().map_or(false, |t| texture == &*t) {

View file

@ -6,7 +6,7 @@
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants; use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants; use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants as constants;
use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject}; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject};
use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::bindings::root::{DomRoot, MutNullableDom};
@ -14,7 +14,10 @@ use crate::dom::webgl_validations::types::TexImageTarget;
use crate::dom::webglframebuffer::WebGLFramebuffer; use crate::dom::webglframebuffer::WebGLFramebuffer;
use crate::dom::webglobject::WebGLObject; use crate::dom::webglobject::WebGLObject;
use crate::dom::webglrenderingcontext::{Operation, WebGLRenderingContext}; use crate::dom::webglrenderingcontext::{Operation, WebGLRenderingContext};
use canvas_traits::webgl::{webgl_channel, TexDataType, TexFormat, WebGLResult, WebGLTextureId}; use canvas_traits::webgl::{
webgl_channel, TexDataType, TexFormat, TexParameter, TexParameterBool, TexParameterInt,
WebGLResult, WebGLTextureId,
};
use canvas_traits::webgl::{DOMToTextureCommand, WebGLCommand, WebGLError}; use canvas_traits::webgl::{DOMToTextureCommand, WebGLCommand, WebGLError};
use dom_struct::dom_struct; use dom_struct::dom_struct;
use std::cell::Cell; use std::cell::Cell;
@ -23,6 +26,7 @@ use std::cmp;
pub enum TexParameterValue { pub enum TexParameterValue {
Float(f32), Float(f32),
Int(i32), Int(i32),
Bool(bool),
} }
const MAX_LEVEL_COUNT: usize = 31; const MAX_LEVEL_COUNT: usize = 31;
@ -50,6 +54,8 @@ pub struct WebGLTexture {
attached_to_dom: Cell<bool>, attached_to_dom: Cell<bool>,
/// Framebuffer that this texture is attached to. /// Framebuffer that this texture is attached to.
attached_framebuffer: MutNullableDom<WebGLFramebuffer>, attached_framebuffer: MutNullableDom<WebGLFramebuffer>,
/// Number of immutable levels.
immutable_levels: Cell<Option<u32>>,
} }
impl WebGLTexture { impl WebGLTexture {
@ -59,6 +65,7 @@ impl WebGLTexture {
id: id, id: id,
target: Cell::new(None), target: Cell::new(None),
is_deleted: Cell::new(false), is_deleted: Cell::new(false),
immutable_levels: Cell::new(None),
face_count: Cell::new(0), face_count: Cell::new(0),
base_mipmap_level: 0, base_mipmap_level: 0,
min_filter: Cell::new(constants::NEAREST_MIPMAP_LINEAR), min_filter: Cell::new(constants::NEAREST_MIPMAP_LINEAR),
@ -221,10 +228,26 @@ impl WebGLTexture {
self.is_deleted.get() self.is_deleted.get()
} }
pub fn is_immutable(&self) -> bool {
self.immutable_levels.get().is_some()
}
pub fn target(&self) -> Option<u32> { pub fn target(&self) -> Option<u32> {
self.target.get() self.target.get()
} }
pub fn maybe_get_tex_parameter(&self, param: TexParameter) -> Option<TexParameterValue> {
match param {
TexParameter::Int(TexParameterInt::TextureImmutableLevels) => Some(
TexParameterValue::Int(self.immutable_levels.get().unwrap_or(0) as i32),
),
TexParameter::Bool(TexParameterBool::TextureImmutableFormat) => {
Some(TexParameterValue::Bool(self.is_immutable()))
},
_ => None,
}
}
/// We have to follow the conversion rules for GLES 2.0. See: /// We have to follow the conversion rules for GLES 2.0. See:
/// https://www.khronos.org/webgl/public-mailing-list/archives/1008/msg00014.html /// https://www.khronos.org/webgl/public-mailing-list/archives/1008/msg00014.html
/// ///
@ -234,6 +257,7 @@ impl WebGLTexture {
let (int_value, float_value) = match value { let (int_value, float_value) = match value {
TexParameterValue::Int(int_value) => (int_value, int_value as f32), TexParameterValue::Int(int_value) => (int_value, int_value as f32),
TexParameterValue::Float(float_value) => (float_value as i32, float_value), TexParameterValue::Float(float_value) => (float_value as i32, float_value),
TexParameterValue::Bool(_) => unreachable!("no settable tex params should be booleans"),
}; };
let update_filter = |filter: &Cell<u32>| { let update_filter = |filter: &Cell<u32>| {
@ -366,13 +390,13 @@ impl WebGLTexture {
fn face_index_for_target(&self, target: &TexImageTarget) -> u8 { fn face_index_for_target(&self, target: &TexImageTarget) -> u8 {
match *target { match *target {
TexImageTarget::Texture2D => 0,
TexImageTarget::CubeMapPositiveX => 0, TexImageTarget::CubeMapPositiveX => 0,
TexImageTarget::CubeMapNegativeX => 1, TexImageTarget::CubeMapNegativeX => 1,
TexImageTarget::CubeMapPositiveY => 2, TexImageTarget::CubeMapPositiveY => 2,
TexImageTarget::CubeMapNegativeY => 3, TexImageTarget::CubeMapNegativeY => 3,
TexImageTarget::CubeMapPositiveZ => 4, TexImageTarget::CubeMapPositiveZ => 4,
TexImageTarget::CubeMapNegativeZ => 5, TexImageTarget::CubeMapNegativeZ => 5,
_ => 0,
} }
} }
@ -415,6 +439,58 @@ impl WebGLTexture {
pub fn detach_from_framebuffer(&self) { pub fn detach_from_framebuffer(&self) {
self.attached_framebuffer.set(None); self.attached_framebuffer.set(None);
} }
pub fn storage(
&self,
target: TexImageTarget,
levels: u32,
internal_format: TexFormat,
width: u32,
height: u32,
depth: u32,
) -> WebGLResult<()> {
// Handled by the caller
assert!(!self.is_immutable());
assert!(self.target().is_some());
let target_id = target.as_gl_constant();
let command = match target {
TexImageTarget::Texture2D | TexImageTarget::CubeMap => {
WebGLCommand::TexStorage2D(target_id, levels, internal_format, width, height)
},
TexImageTarget::Texture3D | TexImageTarget::Texture2DArray => {
WebGLCommand::TexStorage3D(target_id, levels, internal_format, width, height, depth)
},
_ => unreachable!(), // handled by the caller
};
self.upcast::<WebGLObject>().context().send_command(command);
let mut width = width;
let mut height = height;
let mut depth = depth;
for level in 0..levels {
let image_info = ImageInfo {
width,
height,
depth,
internal_format,
data_type: None,
};
self.set_image_infos_at_level(level, image_info);
width = cmp::max(1, width / 2);
height = cmp::max(1, height / 2);
depth = cmp::max(1, depth / 2);
}
self.immutable_levels.set(Some(levels));
if let Some(fb) = self.attached_framebuffer.get() {
fb.update_status();
}
Ok(())
}
} }
impl Drop for WebGLTexture { impl Drop for WebGLTexture {

View file

@ -310,10 +310,10 @@ interface mixin WebGL2RenderingContextBase
GLsizei width, GLsizei height); GLsizei width, GLsizei height);
/* Texture objects */ /* Texture objects */
// void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
// GLsizei height); GLsizei height);
// void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
// GLsizei height, GLsizei depth); GLsizei height, GLsizei depth);
//[Throws] //[Throws]
//void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, //void texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,

View file

@ -8,3 +8,7 @@
[WebGL test #37: getError expected: NO_ERROR. Was INVALID_OPERATION : colorBufferFormat: RGB565 internalFormat: RGB target: TEXTURE_2D border: 0] [WebGL test #37: getError expected: NO_ERROR. Was INVALID_OPERATION : colorBufferFormat: RGB565 internalFormat: RGB target: TEXTURE_2D border: 0]
expected: FAIL expected: FAIL
[WebGL test #13: getError expected: INVALID_ENUM. Was NO_ERROR : paramName: 0x813a]
expected: FAIL

View file

@ -0,0 +1,2 @@
[texture-size-limit.html]
expected: TIMEOUT

View file

@ -1,100 +0,0 @@
[bound-buffer-size-change-test.html]
[WebGL test #38: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #23: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #4: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #28: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 4. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #22: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 4. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #33: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 12. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #16: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #7: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #35: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #37: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 16. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #39: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 12. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #21: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 8. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #40: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 16. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #15: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #25: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 4. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #32: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #14: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #11: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #36: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 12. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #3: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #5: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #6: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #24: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 8. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #34: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 16. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #26: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #2: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #20: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #27: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 8. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #12: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #13: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #34: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 256. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #37: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 256. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #40: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 256. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL

View file

@ -1,4 +0,0 @@
[delete-buffer.html]
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : texImage2D should succeed]
expected: FAIL

View file

@ -2,6 +2,3 @@
[WebGL test #17: areArraysEqual(dest, srcData) should be true. Was false.] [WebGL test #17: areArraysEqual(dest, srcData) should be true. Was false.]
expected: FAIL expected: FAIL
[WebGL test #16: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: gl.getBufferSubData(gl.COPY_WRITE_BUFFER, 0, dest)]
expected: FAIL

View file

@ -2,45 +2,21 @@
[WebGL test #1: Property either does not exist or is not a function: blitFramebuffer] [WebGL test #1: Property either does not exist or is not a function: blitFramebuffer]
expected: FAIL expected: FAIL
[WebGL test #7: Property either does not exist or is not a function: compressedTexImage3D] [WebGL test #4: Property either does not exist or is not a function: copyTexSubImage3D]
expected: FAIL expected: FAIL
[WebGL test #4: Property either does not exist or is not a function: texStorage3D] [WebGL test #5: Property either does not exist or is not a function: compressedTexImage3D]
expected: FAIL
[WebGL test #11: Property either does not exist or is not a function: vertexAttribI4ui]
expected: FAIL expected: FAIL
[WebGL test #2: Property either does not exist or is not a function: texImage3D] [WebGL test #2: Property either does not exist or is not a function: texImage3D]
expected: FAIL expected: FAIL
[WebGL test #12: Property either does not exist or is not a function: vertexAttribI4uiv] [WebGL test #3: Property either does not exist or is not a function: texSubImage3D]
expected: FAIL expected: FAIL
[WebGL test #3: Property either does not exist or is not a function: texStorage2D] [WebGL test #6: Property either does not exist or is not a function: compressedTexSubImage3D]
expected: FAIL
[WebGL test #8: Property either does not exist or is not a function: compressedTexSubImage3D]
expected: FAIL expected: FAIL
[WebGL test #0: Property either does not exist or is not a function: isContextLost] [WebGL test #0: Property either does not exist or is not a function: isContextLost]
expected: FAIL expected: FAIL
[WebGL test #9: Property either does not exist or is not a function: vertexAttribI4i]
expected: FAIL
[WebGL test #13: Property either does not exist or is not a function: vertexAttribIPointer]
expected: FAIL
[WebGL test #14: Property either does not exist or is not a function: drawRangeElements]
expected: FAIL
[WebGL test #5: Property either does not exist or is not a function: texSubImage3D]
expected: FAIL
[WebGL test #10: 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: copyTexSubImage3D]
expected: FAIL

View file

@ -1,52 +1,55 @@
[ext-color-buffer-float.html] [ext-color-buffer-float.html]
[WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : floating-point texture allocation should succeed] [WebGL test #43: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.]
expected: FAIL
[WebGL test #57: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL
[WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : floating-point texture allocation should succeed]
expected: FAIL
[WebGL test #8: getError expected: NO_ERROR. Was INVALID_ENUM : floating-point texture allocation should succeed]
expected: FAIL
[WebGL test #48: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL
[WebGL test #5: getError expected: NO_ERROR. Was INVALID_ENUM : floating-point texture allocation should succeed]
expected: FAIL
[WebGL test #45: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL
[WebGL test #42: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL
[WebGL test #30: getError expected: NO_ERROR. Was INVALID_ENUM : RGB16F texture allocation should succeed]
expected: FAIL
[WebGL test #33: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : floating-point texture allocation should succeed]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_ENUM : floating-point texture allocation should succeed]
expected: FAIL
[WebGL test #20: getError expected: NO_ERROR. Was INVALID_ENUM : floating-point texture allocation should succeed]
expected: FAIL expected: FAIL
[WebGL test #51: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.] [WebGL test #51: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL expected: FAIL
[WebGL test #54: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.] [WebGL test #55: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.]
expected: FAIL expected: FAIL
[WebGL test #36: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.] [WebGL test #18: floating-point RGBA32F render target should not be supported without enabling EXT_color_buffer_float]
expected: FAIL
[WebGL test #59: getError expected one of: INVALID_ENUM or INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : CopyTexImage2D should fail.]
expected: FAIL
[WebGL test #45: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL
[WebGL test #38: getError expected one of: INVALID_ENUM or INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : CopyTexImage2D should fail.]
expected: FAIL
[WebGL test #56: getError expected one of: INVALID_ENUM or INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : CopyTexImage2D should fail.]
expected: FAIL
[WebGL test #44: getError expected one of: INVALID_ENUM or INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : CopyTexImage2D should fail.]
expected: FAIL
[WebGL test #33: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL
[WebGL test #58: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.]
expected: FAIL
[WebGL test #31: RGB16F render target should not be supported with or without enabling EXT_color_buffer_float]
expected: FAIL
[WebGL test #37: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.]
expected: FAIL
[WebGL test #49: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.]
expected: FAIL
[WebGL test #21: floating-point R11F_G11F_B10F render target should not be supported without enabling EXT_color_buffer_float]
expected: FAIL
[WebGL test #9: floating-point RGBA16F render target should not be supported without enabling EXT_color_buffer_float]
expected: FAIL expected: FAIL
[WebGL test #39: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.] [WebGL test #39: getError expected: NO_ERROR. Was INVALID_ENUM : Setup framebuffer with texture should succeed.]
expected: FAIL expected: FAIL
[WebGL test #50: getError expected one of: INVALID_ENUM or INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : CopyTexImage2D should fail.]
expected: FAIL

View file

@ -1,97 +1,13 @@
[read-pixels-from-fbo-test.html] [read-pixels-from-fbo-test.html]
[WebGL test #0: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error] [WebGL test #43: Expected color = 187.51696199784095,0,255,178.5, was = 128,0,255,178]
expected: FAIL expected: FAIL
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error] [WebGL test #41: Expected color = 187.51696199784095,0,255,178.5, was = 128,0,255,178]
expected: FAIL expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error] [WebGL test #86: Expected color = 716.0999999999999,0,511.5,3, was = 0,0,0,0]
expected: FAIL expected: FAIL
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error] [WebGL test #85: getError expected: NO_ERROR. Was INVALID_OPERATION : readPixels should generate no error]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #5: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #6: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #7: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #8: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #9: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #10: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #13: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #16: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #18: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #19: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #20: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #21: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #22: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #23: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #24: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #25: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #26: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #27: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #28: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #30: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL
[WebGL test #31: getError expected: NO_ERROR. Was INVALID_ENUM : Setting up fbo should generate no error]
expected: FAIL expected: FAIL

View file

@ -1,25 +1,5 @@
[blitframebuffer-filter-outofbounds.html] [blitframebuffer-filter-outofbounds.html]
[WebGL test #4: framebuffer not complete] expected: ERROR
expected: FAIL [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #8: framebuffer not complete]
expected: FAIL
[WebGL test #1: framebuffer not complete]
expected: FAIL
[WebGL test #6: framebuffer not complete]
expected: FAIL
[WebGL test #3: framebuffer not complete]
expected: FAIL
[WebGL test #2: framebuffer not complete]
expected: FAIL
[WebGL test #7: framebuffer not complete]
expected: FAIL
[WebGL test #5: framebuffer not complete]
expected: FAIL expected: FAIL

View file

@ -1,13 +1,5 @@
[blitframebuffer-outside-readbuffer.html] [blitframebuffer-outside-readbuffer.html]
[WebGL test #4: framebuffer not complete] expected: ERROR
expected: FAIL [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #1: framebuffer not complete]
expected: FAIL
[WebGL test #3: framebuffer not complete]
expected: FAIL
[WebGL test #2: framebuffer not complete]
expected: FAIL expected: FAIL

View file

@ -1,25 +1,5 @@
[blitframebuffer-scissor-enabled.html] [blitframebuffer-scissor-enabled.html]
[WebGL test #2: Framebuffer incomplete.] expected: ERROR
expected: FAIL [WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #3: Framebuffer incomplete.]
expected: FAIL
[WebGL test #8: Framebuffer incomplete.]
expected: FAIL
[WebGL test #1: Framebuffer incomplete.]
expected: FAIL
[WebGL test #4: Framebuffer incomplete.]
expected: FAIL
[WebGL test #6: Framebuffer incomplete.]
expected: FAIL
[WebGL test #7: Framebuffer incomplete.]
expected: FAIL
[WebGL test #5: Framebuffer incomplete.]
expected: FAIL expected: FAIL

View file

@ -1,4 +1,5 @@
[blitframebuffer-size-overflow.html] [blitframebuffer-size-overflow.html]
[WebGL test #1: Framebuffer incomplete.] expected: ERROR
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL expected: FAIL

View file

@ -1,109 +1,5 @@
[blitframebuffer-srgb-and-linear-drawbuffers.html] [blitframebuffer-srgb-and-linear-drawbuffers.html]
[WebGL test #10: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed] expected: ERROR
expected: FAIL [WebGL test #3: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #31: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #7: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #35: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #3: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #21: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #30: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #6: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #9: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #22: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #20: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #27: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #13: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #12: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #19: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #34: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #24: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #25: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #16: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #15: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #18: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #33: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #28: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #8: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #26: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #32: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #23: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #36: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #5: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL expected: FAIL

View file

@ -1,5 +1,5 @@
[blitframebuffer-stencil-only.html] [blitframebuffer-stencil-only.html]
expected: ERROR expected: ERROR
[WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] [WebGL test #11: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL expected: FAIL

View file

@ -1,10 +1,2 @@
[clear-srgb-color-buffer.html] [clear-srgb-color-buffer.html]
[WebGL test #1: Framebuffer incomplete.] disabled: uninitialized pixel values in error messages
expected: FAIL
[WebGL test #2: \nat (0, 0) expected: 124,193,222,255 was 0,0,0,0]
expected: FAIL
[WebGL test #3: \nat (0, 0) expected: 124,193,222,255 was 0,0,0,0]
expected: FAIL

View file

@ -2,6 +2,3 @@
[WebGL test #3: Framebuffer incomplete.] [WebGL test #3: Framebuffer incomplete.]
expected: FAIL expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : Succeed to create textures.]
expected: FAIL

View file

@ -1,22 +1,4 @@
[draw-buffers-dirty-state-bug.html] [draw-buffers-dirty-state-bug.html]
[WebGL test #6: should be green\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #3: should be red\nat (0, 0) expected: 255,0,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #7: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : there should be no errors]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : Clear and draw should cause no GL errors] [WebGL test #4: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : Clear and draw should cause no GL errors]
expected: FAIL expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : Clear and draw should cause no GL errors]
expected: FAIL
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_ENUM : Setup should cause no GL errors]
expected: FAIL
[WebGL test #5: should be red\nat (0, 0) expected: 255,0,0,255 was 0,0,0,0]
expected: FAIL

View file

@ -1,71 +1,26 @@
[draw-buffers.html] [draw-buffers.html]
[WebGL test #44: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #49: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #43: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #38: attachment 1 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #51: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #50: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #48: attachment 3 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #42: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #40: attachment 3 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #39: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #46: attachment 1 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #47: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #52: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #41: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #39: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,255,0,0] [WebGL test #39: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,255,0,0]
expected: FAIL expected: FAIL
[WebGL test #52: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,255,255,0] [WebGL test #44: attachment 7 should be 0,255,0,255\nat (4, 0) expected: 0,255,0,255 was 255,255,0,0]
expected: FAIL expected: FAIL
[WebGL test #44: attachment 7 should be 0,255,0,255\nat (4, 0) expected: 0,255,0,255 was 255,0,0,0] [WebGL test #43: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,0,255]
expected: FAIL
[WebGL test #42: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,255,255,0]
expected: FAIL
[WebGL test #50: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,255,255,0]
expected: FAIL
[WebGL test #51: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,0,0]
expected: FAIL expected: FAIL
[WebGL test #47: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,255,0,0] [WebGL test #47: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,255,0,0]
expected: FAIL expected: FAIL
[WebGL test #41: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,255,0] [WebGL test #50: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,255,0,0]
expected: FAIL expected: FAIL
[WebGL test #43: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,0,0] [WebGL test #52: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,255,255]
expected: FAIL
[WebGL test #51: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,0,255]
expected: FAIL
[WebGL test #41: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,255,0]
expected: FAIL expected: FAIL
[WebGL test #46: attachment 1 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,0] [WebGL test #46: attachment 1 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,0]
@ -80,6 +35,9 @@
[WebGL test #49: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,255,0] [WebGL test #49: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,255,0]
expected: FAIL expected: FAIL
[WebGL test #42: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,255,0,0]
expected: FAIL
[WebGL test #40: attachment 3 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,0] [WebGL test #40: attachment 3 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,0]
expected: FAIL expected: FAIL

View file

@ -1,16 +1,4 @@
[element-index-uint.html] [element-index-uint.html]
[WebGL test #51: should be 0,255,0,255\nat (1, 0) expected: 0,255,0,255 was 0,0,255,255]
expected: FAIL
[WebGL test #49: should be 0,255,0,255\nat (1, 0) expected: 0,255,0,255 was 0,0,255,255]
expected: FAIL
[WebGL test #20: should be 0,255,0,255\nat (1, 0) expected: 0,255,0,255 was 0,0,255,255]
expected: FAIL
[WebGL test #18: should be 0,255,0,255\nat (1, 0) expected: 0,255,0,255 was 0,0,255,255]
expected: FAIL
[WebGL test #27: getError expected: NO_ERROR. Was INVALID_OPERATION : after drawing] [WebGL test #27: getError expected: NO_ERROR. Was INVALID_OPERATION : after drawing]
expected: FAIL expected: FAIL

View file

@ -1,5 +0,0 @@
[framebuffer-completeness-draw-framebuffer.html]
expected: ERROR
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -5,9 +5,6 @@
[WebGL test #3: Framebuffer incomplete.] [WebGL test #3: Framebuffer incomplete.]
expected: FAIL expected: FAIL
[WebGL test #8: getError expected: NO_ERROR. Was INVALID_ENUM : If color buffers' type mismatch the type of fragment shader's outputs, geneate INVALID_OPERATION. Otherwise, it should be NO_ERROR]
expected: FAIL
[WebGL test #4: Framebuffer incomplete.] [WebGL test #4: Framebuffer incomplete.]
expected: FAIL expected: FAIL

View file

@ -1,7 +0,0 @@
[out-of-bounds-index-buffers-after-copying.html]
[WebGL test #9: should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,255]
expected: FAIL
[WebGL test #6: should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,255]
expected: FAIL

View file

@ -1,17 +1,2 @@
[read-draw-when-missing-image.html] [read-draw-when-missing-image.html]
expected: ERROR expected: TIMEOUT
[WebGL test #3: getError expected: INVALID_OPERATION. Was INVALID_FRAMEBUFFER_OPERATION : Should generate INVALID_OPERATION when reading from a color buffer without image.]
expected: FAIL
[WebGL test #1: Framebuffer incomplete.]
expected: FAIL
[WebGL test #4: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image.]
expected: FAIL
[WebGL test #2: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image.]
expected: FAIL
[WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,7 +0,0 @@
[multi-context-sampler-test.html]
[WebGL test #2: should be green\nat (0, 0) expected: 0,255,0,255 was 0,0,0,255]
expected: FAIL
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_ENUM : there should be no errors]
expected: FAIL

View file

@ -9,12 +9,27 @@
[WebGL test #203: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_LEVELS) should be 0 (of type number). Was null (of type object).] [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 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 #9: gl.getBufferParameter(gl.COPY_WRITE_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
expected: FAIL
[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 #4: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #204: getTexParameter returned 1 instead of null for invalid parameter enum: 0x84fe] [WebGL test #204: getTexParameter returned 1 instead of null for invalid parameter enum: 0x84fe]
expected: FAIL 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).] [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 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 #257: getError expected: NO_ERROR. Was INVALID_OPERATION : ] [WebGL test #257: getError expected: NO_ERROR. Was INVALID_OPERATION : ]
expected: FAIL expected: FAIL
@ -27,13 +42,16 @@
[WebGL test #198: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LEVEL) should be 10 (of type number). Was null (of type object).] [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 expected: FAIL
[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 #337: gl.getActiveUniformBlockName(program, 0) should be Transform. Was _uTransform.] [WebGL test #337: gl.getActiveUniformBlockName(program, 0) should be Transform. Was _uTransform.]
expected: FAIL expected: FAIL
[WebGL test #259: gl.getUniform(samplerForWebGL2Program, s2DArrayValLoc) should be 1. Was 0.] [WebGL test #259: gl.getUniform(samplerForWebGL2Program, s2DArrayValLoc) should be 1. Was 0.]
expected: FAIL 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).] [WebGL test #199: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LOD) should be 10. Was 1000.]
expected: FAIL expected: FAIL
[WebGL test #182: gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_SAMPLES) should be 4 (of type number). Was null (of type object).] [WebGL test #182: gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_SAMPLES) should be 4 (of type number). Was null (of type object).]
@ -42,12 +60,45 @@
[WebGL test #276: getError expected: NO_ERROR. Was INVALID_ENUM : ] [WebGL test #276: getError expected: NO_ERROR. Was INVALID_ENUM : ]
expected: FAIL 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).] [WebGL test #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
expected: FAIL 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).] [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 expected: FAIL
[WebGL test #198: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LEVEL) should be 10. Was 1000.]
expected: FAIL
[WebGL test #201: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_R) should be 33071. Was 10497.]
expected: FAIL
[WebGL test #5: getBufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
expected: FAIL
[WebGL test #197: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE) should be 34894. Was 0.]
expected: FAIL
[WebGL test #200: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MIN_LOD) should be 0. Was -1000.]
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 #19: gl.getBufferParameter(gl.TRANSFORM_FEEDBACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #21: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). 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
[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 #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 #275: gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be true (of type boolean). Was null (of type object).] [WebGL test #275: gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be true (of type boolean). Was null (of type object).]
expected: FAIL expected: FAIL
@ -65,3 +116,7 @@
[WebGL test #183: getRenderbufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR] [WebGL test #183: getRenderbufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
expected: FAIL expected: FAIL
[WebGL test #202: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_FORMAT) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1,5 @@
[active-3d-texture-bug.html]
expected: ERROR
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -0,0 +1,115 @@
[copy-texture-cube-map-AMD-bug.html]
[WebGL test #15: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Was 36054.]
expected: FAIL
[WebGL test #36: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #38: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #24: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #21: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #40: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #23: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #17: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #39: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #22: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #29: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Was 36054.]
expected: FAIL
[WebGL test #13: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #11: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #20: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #9: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #19: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #10: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #28: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #6: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #34: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #26: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #32: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #33: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #41: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #37: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #8: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #7: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #42: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #31: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #35: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #27: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #25: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL
[WebGL test #18: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : CopyTexSubImage2D should succeed.]
expected: FAIL
[WebGL test #5: getError expected: NO_ERROR. Was INVALID_OPERATION : CopyTexImage2D should succeed.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[copy-texture-image-luma-format.html]
expected: ERROR
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -0,0 +1,2 @@
[copy-texture-image-same-texture.html]
expected: TIMEOUT

View file

@ -0,0 +1,5 @@
[copy-texture-image-webgl-specific.html]
expected: ERROR
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -0,0 +1,2 @@
[copy-texture-image.html]
expected: TIMEOUT

View file

@ -0,0 +1,673 @@
[gl-get-tex-parameter.html]
[WebGL test #87: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LOD"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #206: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #15: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_T"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #7: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_S"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #278: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LEVEL"\]) should be 300 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #311: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #173: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #313: getError expected: NO_ERROR. Was INVALID_OPERATION : should be no errors]
expected: FAIL
[WebGL test #199: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #261: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #163: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100. Was 0.]
expected: FAIL
[WebGL test #246: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_R"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #283: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MIN_LOD"\]) should be -500. Was -1000.]
expected: FAIL
[WebGL test #165: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #136: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_FILTER"\]) should be 9987 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #256: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 513 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #244: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_WRAP_R"\]) should be 33648. Was 10497.]
expected: FAIL
[WebGL test #247: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_R"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #189: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LOD"\]) should be 500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #103: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #158: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #184: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_LOD"\]) should be -500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #243: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_WRAP_R"\]) should be 33071. Was 10497.]
expected: FAIL
[WebGL test #143: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_R"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #37: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_R"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #47: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 515 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #153: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894. Was 0.]
expected: FAIL
[WebGL test #200: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #238: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #215: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_S"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #69: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LEVEL"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #71: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #312: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #268: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_BASE_LEVEL"\]) should be 99. Was 0.]
expected: FAIL
[WebGL test #56: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #280: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 300 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #88: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LOD"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #290: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LOD"\]) should be 999. Was 1000.]
expected: FAIL
[WebGL test #241: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_WRAP_R"\]) should be 33071. Was 10497.]
expected: FAIL
[WebGL test #171: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800. Was 1000.]
expected: FAIL
[WebGL test #186: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LOD"\]) should be 500. Was 1000.]
expected: FAIL
[WebGL test #192: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LOD"\]) should be 500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #94: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #95: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #292: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LOD"\]) should be 999. Was 1000.]
expected: FAIL
[WebGL test #303: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #61: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_BASE_LEVEL"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #112: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_S"\]) should be 33071 (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 0 (of type number).]
expected: FAIL
[WebGL test #147: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516. Was 515.]
expected: FAIL
[WebGL test #204: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #287: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_LOD"\]) should be -500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #32: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_FILTER"\]) should be 9986 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #265: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100. Was 0.]
expected: FAIL
[WebGL test #96: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #70: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LEVEL"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #306: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #205: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #187: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LOD"\]) should be 500. Was 1000.]
expected: FAIL
[WebGL test #252: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 513. Was 515.]
expected: FAIL
[WebGL test #133: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_FILTER"\]) should be 9987 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #128: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAG_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #213: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_S"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #45: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 515 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #293: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LOD"\]) should be 500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #144: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_R"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #207: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #148: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516. Was 515.]
expected: FAIL
[WebGL test #295: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LOD"\]) should be 500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #137: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_WRAP_R"\]) should be 33071. Was 10497.]
expected: FAIL
[WebGL test #216: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_S"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #279: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #270: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_BASE_LEVEL"\]) should be 99 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #178: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MIN_LOD"\]) should be -500. Was -1000.]
expected: FAIL
[WebGL test #29: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_FILTER"\]) should be 9986 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #242: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_WRAP_R"\]) should be 33648. Was 10497.]
expected: FAIL
[WebGL test #307: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #302: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #269: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #221: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_T"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #276: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LEVEL"\]) should be 300. Was 1000.]
expected: FAIL
[WebGL test #264: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #262: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_MODE"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #111: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_S"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #101: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #308: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #127: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAG_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #288: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_LOD"\]) should be -999 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #190: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LOD"\]) should be 500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #48: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 515 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #125: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAG_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #149: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #267: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100. Was 0.]
expected: FAIL
[WebGL test #160: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #301: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #168: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #62: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_BASE_LEVEL"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #31: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_FILTER"\]) should be 9986 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #251: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516. Was 515.]
expected: FAIL
[WebGL test #100: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #135: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_FILTER"\]) should be 9987 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #8: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_S"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #183: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_LOD"\]) should be -500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #224: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_T"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #182: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_LOD"\]) should be -500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #266: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 99. Was 0.]
expected: FAIL
[WebGL test #72: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #245: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_R"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #138: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_WRAP_R"\]) should be 33071. Was 10497.]
expected: FAIL
[WebGL test #117: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_T"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #80: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_LOD"\]) should be -1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #23: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAG_FILTER"\]) should be 9729 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #166: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #273: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800. Was 1000.]
expected: FAIL
[WebGL test #38: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_R"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #176: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #175: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #24: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAG_FILTER"\]) should be 9729 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #0: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
expected: FAIL
[WebGL test #6: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_S"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #98: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #150: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #180: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MIN_LOD"\]) should be -500. Was -1000.]
expected: FAIL
[WebGL test #203: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #237: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_FILTER"\]) should be 9987 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #304: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #305: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #99: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #119: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_T"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #201: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #159: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #232: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAG_FILTER"\]) should be 9729 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #250: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 513. Was 515.]
expected: FAIL
[WebGL test #21: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAG_FILTER"\]) should be 9729 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #222: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_T"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #231: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAG_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #253: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #30: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_FILTER"\]) should be 9986 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #126: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAG_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #223: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_T"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #93: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #286: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_LOD"\]) should be -999 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #239: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_FILTER"\]) should be 9987 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #285: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_LOD"\]) should be -500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #85: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LOD"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #46: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 515 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #55: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #146: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516. Was 515.]
expected: FAIL
[WebGL test #309: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #63: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #161: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100. Was 0.]
expected: FAIL
[WebGL test #97: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was 0 (of type number).]
expected: FAIL
[WebGL test #277: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #240: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #157: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #54: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_MODE"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #254: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 513 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #177: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MIN_LOD"\]) should be -500. Was -1000.]
expected: FAIL
[WebGL test #142: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_R"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #282: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MIN_LOD"\]) should be -999. Was -1000.]
expected: FAIL
[WebGL test #191: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LOD"\]) should be 500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #155: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894. Was 0.]
expected: FAIL
[WebGL test #263: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #255: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #110: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_S"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #167: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #22: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAG_FILTER"\]) should be 9729 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #296: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MAX_LOD"\]) should be 999 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #284: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MIN_LOD"\]) should be -999. Was -1000.]
expected: FAIL
[WebGL test #179: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MIN_LOD"\]) should be -500. Was -1000.]
expected: FAIL
[WebGL test #259: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894. Was 0.]
expected: FAIL
[WebGL test #185: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LOD"\]) should be 500. Was 1000.]
expected: FAIL
[WebGL test #272: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 99 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #198: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #170: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800. Was 1000.]
expected: FAIL
[WebGL test #281: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MIN_LOD"\]) should be -500. Was -1000.]
expected: FAIL
[WebGL test #271: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #140: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_WRAP_R"\]) should be 33071. Was 10497.]
expected: FAIL
[WebGL test #53: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_COMPARE_MODE"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #77: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_LOD"\]) should be -1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #104: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #181: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_LOD"\]) should be -500 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #78: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_LOD"\]) should be -1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #164: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100. Was 0.]
expected: FAIL
[WebGL test #145: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516. Was 515.]
expected: FAIL
[WebGL test #5: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_S"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #79: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_MIN_LOD"\]) should be -1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #152: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #310: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #174: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #16: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_T"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #102: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #289: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LOD"\]) should be 500. Was 1000.]
expected: FAIL
[WebGL test #230: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAG_FILTER"\]) should be 9729 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #208: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_IMMUTABLE_FORMAT"\]) should be false (of type boolean). Was null (of type object).]
expected: FAIL
[WebGL test #141: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_R"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #86: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LOD"\]) should be 1000 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #14: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_T"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #172: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800. Was 1000.]
expected: FAIL
[WebGL test #118: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_T"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #64: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #120: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_T"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #151: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #229: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAG_FILTER"\]) should be 9728 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #294: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MAX_LOD"\]) should be 999 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #214: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_S"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #291: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LOD"\]) should be 500. Was 1000.]
expected: FAIL
[WebGL test #274: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 300. Was 1000.]
expected: FAIL
[WebGL test #188: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LOD"\]) should be 500. Was 1000.]
expected: FAIL
[WebGL test #162: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_BASE_LEVEL"\]) should be 100. Was 0.]
expected: FAIL
[WebGL test #40: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_R"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #249: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_COMPARE_FUNC"\]) should be 516. Was 515.]
expected: FAIL
[WebGL test #134: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_MIN_FILTER"\]) should be 9987 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #275: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800. Was 1000.]
expected: FAIL
[WebGL test #197: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_IMMUTABLE_LEVELS"\]) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #156: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894. Was 0.]
expected: FAIL
[WebGL test #39: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_R"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #13: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_T"\]) should be 10497 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #139: gl.getTexParameter(gl["TEXTURE_CUBE_MAP"\], gl["TEXTURE_WRAP_R"\]) should be 33071. Was 10497.]
expected: FAIL
[WebGL test #257: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894. Was 0.]
expected: FAIL
[WebGL test #248: gl.getTexParameter(gl["TEXTURE_3D"\], gl["TEXTURE_WRAP_R"\]) should be 33648 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #109: gl.getTexParameter(gl["TEXTURE_2D_ARRAY"\], gl["TEXTURE_WRAP_S"\]) should be 33071 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #154: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_COMPARE_MODE"\]) should be 34894. Was 0.]
expected: FAIL
[WebGL test #169: gl.getTexParameter(gl["TEXTURE_2D"\], gl["TEXTURE_MAX_LEVEL"\]) should be 800. Was 1000.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[origin-clean-conformance-offscreencanvas.html]
expected: ERROR
[WebGL test #2: Unable to fetch WebGL rendering context for Canvas]
expected: FAIL

View file

@ -0,0 +1,16 @@
[tex-3d-mipmap-levels-intel-bug.html]
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_OPERATION : texParameter(TEXTURE_BASE_LEVEL) should succeed]
expected: FAIL
[WebGL test #6: should draw with [255, 0, 0, 255\]\nat (0, 0) expected: 255,0,0,255 was 0,0,0,255]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_OPERATION : texParameter(TEXTURE_MIN_FILTER) should succeed]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_ENUM : texStorage3D should succeed]
expected: FAIL
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_OPERATION : texParameter(TEXTURE_MAG_FILTER) should succeed]
expected: FAIL

View file

@ -0,0 +1,5 @@
[tex-3d-size-limit.html]
expected: ERROR
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -0,0 +1,10 @@
[tex-base-level-bug.html]
[WebGL test #3: should draw with [255, 0, 0, 255\]\nat (0, 0) expected: 255,0,0,255 was 0,0,0,255]
expected: FAIL
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_ENUM : Texture setup should succeed]
expected: FAIL
[WebGL test #5: should draw with [255, 0, 0, 255\]\nat (0, 0) expected: 255,0,0,255 was 0,0,0,0]
expected: FAIL

View file

@ -0,0 +1,17 @@
[tex-image-and-sub-image-with-array-buffer-view-sub-source.html]
expected: ERROR
[WebGL test #3: Element 1: expected 1, got 0]
expected: FAIL
[WebGL test #8: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #7: Element 1: expected 1, got 0]
expected: FAIL
[WebGL test #4: getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large]
expected: FAIL
[WebGL test #0: getError expected: INVALID_OPERATION. Was NO_ERROR : srcOffset too large]
expected: FAIL

View file

@ -0,0 +1,4 @@
[tex-image-with-bad-args-from-dom-elements.html]
expected:
if os == "mac": TIMEOUT
if os == "linux": CRASH

View file

@ -0,0 +1,14 @@
[tex-image-with-bad-args.html]
expected: TIMEOUT
[WebGL test #5: getError expected: INVALID_OPERATION. Was INVALID_ENUM : TexImage2D taking LUMINANCE_ALPHA/LUMINANCE_ALPHA/HALF_FLOAT]
expected: FAIL
[WebGL test #3: getError expected: INVALID_OPERATION. Was INVALID_ENUM : TexImage2D taking RGBA/RGBA/HALF_FLOAT]
expected: FAIL
[WebGL test #7: getError expected one of: INVALID_VALUE or INVALID_OPERATION. Was INVALID_ENUM : TexImage2D taking RED/RED/UNSIGNED_SHORT]
expected: FAIL
[WebGL test #6: getError expected: INVALID_VALUE. Was INVALID_ENUM : TexImage2D taking 0x822a/RED/UNSIGNED_SHORT]
expected: FAIL

View file

@ -0,0 +1,4 @@
[tex-image-with-different-data-source.html]
expected:
if os == "mac": TIMEOUT
if os == "linux": CRASH

View file

@ -0,0 +1,23 @@
[tex-input-validation.html]
expected: ERROR
[WebGL test #25: getError expected: INVALID_OPERATION. Was NO_ERROR : format: RGBA type: BYTE]
expected: FAIL
[WebGL test #52: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB565 internalFormat: RGBA target: TEXTURE_2D]
expected: FAIL
[WebGL test #24: getError expected: INVALID_OPERATION. Was INVALID_ENUM : format: RED type: UNSIGNED_BYTE]
expected: FAIL
[WebGL test #41: getError expected: NO_ERROR. Was INVALID_OPERATION : colorBufferFormat: RGB565 internalFormat: RGB target: TEXTURE_2D border: 0]
expected: FAIL
[WebGL test #71: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #70: getError expected: NO_ERROR. Was INVALID_ENUM : ]
expected: FAIL
[WebGL test #68: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB internalFormat: RGBA]
expected: FAIL

View file

@ -0,0 +1,32 @@
[tex-mipmap-levels.html]
expected: ERROR
[WebGL test #23: getError expected: NO_ERROR. Was INVALID_ENUM : generateMipmap should succeed]
expected: FAIL
[WebGL test #10: getError expected: NO_ERROR. Was INVALID_OPERATION : generateMipmap should succeed]
expected: FAIL
[WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_MAX_LEVEL) should succeed]
expected: FAIL
[WebGL test #21: getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_BASE_LEVEL) should succeed]
expected: FAIL
[WebGL test #5: getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_MAX_LEVEL) should succeed]
expected: FAIL
[WebGL test #9: should draw with [0, 0, 255, 255\]\nat (0, 0) expected: 0,0,255,255 was 0,0,0,255]
expected: FAIL
[WebGL test #24: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_BASE_LEVEL) should succeed]
expected: FAIL
[WebGL test #11: should draw with [255, 0, 0, 255\]\nat (0, 0) expected: 255,0,0,255 was 0,0,0,255]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_ENUM : texParameter(TEXTURE_BASE_LEVEL) should succeed]
expected: FAIL

View file

@ -0,0 +1,5 @@
[tex-new-formats.html]
expected: ERROR
[WebGL test #8: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -0,0 +1,3 @@
[tex-srgb-mipmap.html]
disabled:
if os == "mac": srgb pixel results aren't good on macos

View file

@ -0,0 +1,11 @@
[tex-storage-2d.html]
disabled: until texture initialization is implemented
[WebGL test #32: texture should sample as uninitialized texture after texStorage2D\nat (0, 0) expected: 0,0,0,255 was 255,84,64,255]
expected: FAIL
[WebGL test #15: texture should sample as uninitialized texture after texStorage2D\nat (0, 0) expected: 0,0,0,0 was 120,110,52,162]
expected: FAIL
[WebGL test #104: texture should sample as uninitialized texture after texStorage2D\nat (0, 0) expected: 0,0,0,255 was 208,68,57,255]
expected: FAIL

View file

@ -0,0 +1,23 @@
[tex-storage-and-subimage-3d.html]
expected: ERROR
[WebGL test #8: getError expected: INVALID_OPERATION. Was INVALID_ENUM : texStorage3D should fail when no texture is bound]
expected: FAIL
[WebGL test #10: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #5: getError expected: INVALID_VALUE. Was INVALID_ENUM : texStorage3D should fail for zero levels]
expected: FAIL
[WebGL test #1: getError expected: INVALID_VALUE. Was INVALID_ENUM : texStorage3D should fail for zero width]
expected: FAIL
[WebGL test #4: getError expected: INVALID_VALUE. Was INVALID_ENUM : texStorage3D should fail for negative height]
expected: FAIL
[WebGL test #3: getError expected: INVALID_VALUE. Was INVALID_ENUM : texStorage3D should fail for zero depth]
expected: FAIL
[WebGL test #2: getError expected: INVALID_VALUE. Was INVALID_ENUM : texStorage3D should fail for zero height]
expected: FAIL

View file

@ -0,0 +1,8 @@
[tex-subimage3d-canvas-bug.html]
expected: ERROR
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from TexStorage3D.]
expected: FAIL
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -0,0 +1,11 @@
[tex-subimage3d-pixel-buffer-bug.html]
expected: ERROR
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : texStorage3D should succeed]
expected: FAIL
[WebGL test #3: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_OPERATION : texParameter(TEXTURE_MIN_FILTER) should succeed]
expected: FAIL

View file

@ -0,0 +1,5 @@
[tex-unpack-params-imagedata.html]
expected: ERROR
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -0,0 +1,4 @@
[tex-unpack-params-with-flip-y-and-premultiply-alpha.html]
expected:
if os == "mac": TIMEOUT
if os == "linux": CRASH

View file

@ -0,0 +1,11 @@
[tex-unpack-params.html]
expected: ERROR
[WebGL test #0: getError expected: NO_ERROR. Was INVALID_ENUM : Set up pixel store parameters should succeed]
expected: FAIL
[WebGL test #11: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #10: getError expected: NO_ERROR. Was INVALID_ENUM : Set up pixel store parameters should succeed]
expected: FAIL

View file

@ -0,0 +1,2 @@
[texture-npot.html]
expected: TIMEOUT

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now

View file

@ -0,0 +1 @@
disabled: for now