mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
webgl: Add support for FBO attachments.
This allows many FBO tests to start running as their framebuffers start coming back as framebuffer complete.
This commit is contained in:
parent
989c936e67
commit
6c10d5ca75
17 changed files with 310 additions and 83 deletions
|
@ -4,15 +4,27 @@
|
|||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::CanvasMsg;
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::WebGLFramebufferBinding;
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::js::{HeapGCValue, JS, Root};
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::webglobject::WebGLObject;
|
||||
use dom::webglrenderbuffer::WebGLRenderbuffer;
|
||||
use dom::webgltexture::WebGLTexture;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use std::cell::Cell;
|
||||
use webrender_traits::{WebGLCommand, WebGLFramebufferBindingRequest, WebGLFramebufferId};
|
||||
use webrender_traits::{WebGLCommand, WebGLFramebufferBindingRequest, WebGLFramebufferId, WebGLResult, WebGLError};
|
||||
|
||||
#[must_root]
|
||||
#[derive(JSTraceable, Clone, HeapSizeOf)]
|
||||
enum WebGLFramebufferAttachment {
|
||||
Renderbuffer(JS<WebGLRenderbuffer>),
|
||||
Texture(JS<WebGLTexture>),
|
||||
}
|
||||
|
||||
impl HeapGCValue for WebGLFramebufferAttachment {}
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WebGLFramebuffer {
|
||||
|
@ -21,8 +33,16 @@ pub struct WebGLFramebuffer {
|
|||
/// target can only be gl::FRAMEBUFFER at the moment
|
||||
target: Cell<Option<u32>>,
|
||||
is_deleted: Cell<bool>,
|
||||
status: Cell<u32>,
|
||||
#[ignore_heap_size_of = "Defined in ipc-channel"]
|
||||
renderer: IpcSender<CanvasMsg>,
|
||||
|
||||
// The attachment points for textures and renderbuffers on this
|
||||
// FBO.
|
||||
color: DOMRefCell<Option<WebGLFramebufferAttachment>>,
|
||||
depth: DOMRefCell<Option<WebGLFramebufferAttachment>>,
|
||||
stencil: DOMRefCell<Option<WebGLFramebufferAttachment>>,
|
||||
depthstencil: DOMRefCell<Option<WebGLFramebufferAttachment>>,
|
||||
}
|
||||
|
||||
impl WebGLFramebuffer {
|
||||
|
@ -35,6 +55,11 @@ impl WebGLFramebuffer {
|
|||
target: Cell::new(None),
|
||||
is_deleted: Cell::new(false),
|
||||
renderer: renderer,
|
||||
status: Cell::new(constants::FRAMEBUFFER_UNSUPPORTED),
|
||||
color: DOMRefCell::new(None),
|
||||
depth: DOMRefCell::new(None),
|
||||
stencil: DOMRefCell::new(None),
|
||||
depthstencil: DOMRefCell::new(None),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,10 +105,144 @@ impl WebGLFramebuffer {
|
|||
self.is_deleted.get()
|
||||
}
|
||||
|
||||
fn update_status(&self) {
|
||||
let has_c = self.color.borrow().is_some();
|
||||
let has_z = self.depth.borrow().is_some();
|
||||
let has_s = self.stencil.borrow().is_some();
|
||||
let has_zs = self.depthstencil.borrow().is_some();
|
||||
|
||||
// From the WebGL spec, 6.6 ("Framebuffer Object Attachments"):
|
||||
//
|
||||
// "In the WebGL API, it is an error to concurrently attach
|
||||
// renderbuffers to the following combinations of
|
||||
// attachment points:
|
||||
//
|
||||
// DEPTH_ATTACHMENT + DEPTH_STENCIL_ATTACHMENT
|
||||
// STENCIL_ATTACHMENT + DEPTH_STENCIL_ATTACHMENT
|
||||
// DEPTH_ATTACHMENT + STENCIL_ATTACHMENT
|
||||
//
|
||||
// If any of the constraints above are violated, then:
|
||||
//
|
||||
// checkFramebufferStatus must return FRAMEBUFFER_UNSUPPORTED."
|
||||
if (has_zs && (has_z || has_s)) ||
|
||||
(has_z && has_s) {
|
||||
self.status.set(constants::FRAMEBUFFER_UNSUPPORTED);
|
||||
return;
|
||||
}
|
||||
|
||||
if has_c || has_z || has_zs || has_s {
|
||||
self.status.set(constants::FRAMEBUFFER_COMPLETE);
|
||||
} else {
|
||||
self.status.set(constants::FRAMEBUFFER_UNSUPPORTED);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn check_status(&self) -> u32 {
|
||||
// Until we build support for attaching renderbuffers or
|
||||
// textures, all user FBOs are incomplete.
|
||||
return constants::FRAMEBUFFER_UNSUPPORTED;
|
||||
return self.status.get();
|
||||
}
|
||||
|
||||
pub fn renderbuffer(&self, attachment: u32, rb: Option<&WebGLRenderbuffer>) -> WebGLResult<()> {
|
||||
let binding = match attachment {
|
||||
constants::COLOR_ATTACHMENT0 => &self.color,
|
||||
constants::DEPTH_ATTACHMENT => &self.depth,
|
||||
constants::STENCIL_ATTACHMENT => &self.stencil,
|
||||
constants::DEPTH_STENCIL_ATTACHMENT => &self.depthstencil,
|
||||
_ => return Err(WebGLError::InvalidEnum),
|
||||
};
|
||||
|
||||
let rb_id = match rb {
|
||||
Some(rb) => {
|
||||
*binding.borrow_mut() = Some(WebGLFramebufferAttachment::Renderbuffer(JS::from_ref(rb)));
|
||||
Some(rb.id())
|
||||
}
|
||||
|
||||
_ => {
|
||||
*binding.borrow_mut() = None;
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
self.renderer.send(CanvasMsg::WebGL(WebGLCommand::FramebufferRenderbuffer(constants::FRAMEBUFFER,
|
||||
attachment,
|
||||
constants::RENDERBUFFER,
|
||||
rb_id))).unwrap();
|
||||
|
||||
self.update_status();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn texture2d(&self, attachment: u32, textarget: u32, texture: Option<&WebGLTexture>,
|
||||
level: i32) -> WebGLResult<()> {
|
||||
let binding = match attachment {
|
||||
constants::COLOR_ATTACHMENT0 => &self.color,
|
||||
constants::DEPTH_ATTACHMENT => &self.depth,
|
||||
constants::STENCIL_ATTACHMENT => &self.stencil,
|
||||
constants::DEPTH_STENCIL_ATTACHMENT => &self.depthstencil,
|
||||
_ => return Err(WebGLError::InvalidEnum),
|
||||
};
|
||||
|
||||
let tex_id = match texture {
|
||||
// Note, from the GLES 2.0.25 spec, page 113:
|
||||
// "If texture is zero, then textarget and level are ignored."
|
||||
Some(texture) => {
|
||||
*binding.borrow_mut() = Some(WebGLFramebufferAttachment::Texture(JS::from_ref(texture)));
|
||||
|
||||
// From the GLES 2.0.25 spec, page 113:
|
||||
//
|
||||
// "level specifies the mipmap level of the texture image
|
||||
// to be attached to the framebuffer and must be
|
||||
// 0. Otherwise, INVALID_VALUE is generated."
|
||||
if level != 0 {
|
||||
return Err(WebGLError::InvalidValue);
|
||||
}
|
||||
|
||||
// "If texture is not zero, then texture must either
|
||||
// name an existing texture object with an target of
|
||||
// textarget, or texture must name an existing cube
|
||||
// map texture and textarget must be one of:
|
||||
// TEXTURE_CUBE_MAP_POSITIVE_X,
|
||||
// TEXTURE_CUBE_MAP_POSITIVE_Y,
|
||||
// TEXTURE_CUBE_MAP_POSITIVE_Z,
|
||||
// TEXTURE_CUBE_MAP_NEGATIVE_X,
|
||||
// TEXTURE_CUBE_MAP_NEGATIVE_Y, or
|
||||
// TEXTURE_CUBE_MAP_NEGATIVE_Z. Otherwise,
|
||||
// INVALID_OPERATION is generated."
|
||||
let is_cube = match textarget {
|
||||
constants::TEXTURE_2D => false,
|
||||
|
||||
constants::TEXTURE_CUBE_MAP_POSITIVE_X => true,
|
||||
constants::TEXTURE_CUBE_MAP_POSITIVE_Y => true,
|
||||
constants::TEXTURE_CUBE_MAP_POSITIVE_Z => true,
|
||||
constants::TEXTURE_CUBE_MAP_NEGATIVE_X => true,
|
||||
constants::TEXTURE_CUBE_MAP_NEGATIVE_Y => true,
|
||||
constants::TEXTURE_CUBE_MAP_NEGATIVE_Z => true,
|
||||
|
||||
_ => return Err(WebGLError::InvalidEnum),
|
||||
};
|
||||
|
||||
match texture.target() {
|
||||
Some(constants::TEXTURE_CUBE_MAP) if is_cube => {}
|
||||
Some(_) if !is_cube => {}
|
||||
_ => return Err(WebGLError::InvalidOperation),
|
||||
}
|
||||
|
||||
Some(texture.id())
|
||||
}
|
||||
|
||||
_ => {
|
||||
*binding.borrow_mut() = None;
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
self.renderer.send(CanvasMsg::WebGL(WebGLCommand::FramebufferTexture2D(constants::FRAMEBUFFER,
|
||||
attachment,
|
||||
textarget,
|
||||
tex_id,
|
||||
level))).unwrap();
|
||||
|
||||
self.update_status();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn target(&self) -> Option<u32> {
|
||||
|
|
|
@ -2602,6 +2602,32 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
// FIXME: We need to clear the renderbuffer before it can be
|
||||
// accessed. See https://github.com/servo/servo/issues/13710
|
||||
}
|
||||
|
||||
fn FramebufferRenderbuffer(&self, target: u32, attachment: u32,
|
||||
renderbuffertarget: u32,
|
||||
rb: Option<&WebGLRenderbuffer>) {
|
||||
if target != constants::FRAMEBUFFER || renderbuffertarget != constants::RENDERBUFFER {
|
||||
return self.webgl_error(InvalidEnum);
|
||||
}
|
||||
|
||||
match self.bound_framebuffer.get() {
|
||||
Some(fb) => handle_potential_webgl_error!(self, fb.renderbuffer(attachment, rb)),
|
||||
None => self.webgl_error(InvalidOperation),
|
||||
};
|
||||
}
|
||||
|
||||
fn FramebufferTexture2D(&self, target: u32, attachment: u32,
|
||||
textarget: u32, texture: Option<&WebGLTexture>,
|
||||
level: i32) {
|
||||
if target != constants::FRAMEBUFFER {
|
||||
return self.webgl_error(InvalidEnum);
|
||||
}
|
||||
|
||||
match self.bound_framebuffer.get() {
|
||||
Some(fb) => handle_potential_webgl_error!(self, fb.texture2d(attachment, textarget, texture, level)),
|
||||
None => self.webgl_error(InvalidOperation),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub trait LayoutCanvasWebGLRenderingContextHelpers {
|
||||
|
|
|
@ -566,11 +566,11 @@ interface WebGLRenderingContextBase
|
|||
void enableVertexAttribArray(GLuint index);
|
||||
void finish();
|
||||
void flush();
|
||||
//void framebufferRenderbuffer(GLenum target, GLenum attachment,
|
||||
// GLenum renderbuffertarget,
|
||||
// WebGLRenderbuffer? renderbuffer);
|
||||
//void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget,
|
||||
// WebGLTexture? texture, GLint level);
|
||||
void framebufferRenderbuffer(GLenum target, GLenum attachment,
|
||||
GLenum renderbuffertarget,
|
||||
WebGLRenderbuffer? renderbuffer);
|
||||
void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget,
|
||||
WebGLTexture? texture, GLint level);
|
||||
void frontFace(GLenum mode);
|
||||
|
||||
void generateMipmap(GLenum target);
|
||||
|
|
|
@ -32,12 +32,6 @@
|
|||
[WebGL test #12: getError expected: INVALID_OPERATION. Was NO_ERROR : after evaluating: contextA.bindTexture(contextA.TEXTURE_2D, textureB)]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #13: contextA.framebufferRenderbuffer(contextA.FRAMEBUFFER, contextA.DEPTH_ATTACHMENT, contextA.RENDERBUFFER, renderBufferB) threw exception TypeError: contextA.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #14: contextA.framebufferTexture2D(contextA.FRAMEBUFFER, contextA.COLOR_ATTACHMENT0, contextA.TEXTURE_2D, textureB, 0) threw exception TypeError: contextA.framebufferTexture2D is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #15: getError expected: INVALID_OPERATION. Was INVALID_ENUM : after evaluating: contextA.getProgramParameter(programB, 0)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -20,12 +20,6 @@
|
|||
[WebGL test #6: Property either does not exist or is not a function: flush]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #7: Property either does not exist or is not a function: framebufferRenderbuffer]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #8: Property either does not exist or is not a function: framebufferTexture2D]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #9: Property either does not exist or is not a function: generateMipmap]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -161,12 +155,6 @@
|
|||
[WebGL test #3: Property either does not exist or is not a function: disableVertexAttribArray]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #4: Property either does not exist or is not a function: framebufferRenderbuffer]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #5: Property either does not exist or is not a function: framebufferTexture2D]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #6: Property either does not exist or is not a function: getActiveAttrib]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -6,12 +6,6 @@
|
|||
[WebGL test #60: context.detachShader(argument, shader) should be undefined. Threw exception TypeError: context.detachShader is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #68: context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) should be undefined. Threw exception TypeError: context.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #69: context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) should be undefined. Threw exception TypeError: context.framebufferTexture2D is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #70: context.uniform2fv(argument, new Float32Array([0.0, 0.0\])) should be undefined. Threw exception TypeError: context.uniform2fv is not a function]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -36,12 +30,6 @@
|
|||
[WebGL test #86: context.detachShader(argument, shader) should be undefined. Threw exception TypeError: context.detachShader is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #94: context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) should be undefined. Threw exception TypeError: context.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #95: context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) should be undefined. Threw exception TypeError: context.framebufferTexture2D is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #96: context.uniform2fv(argument, new Float32Array([0.0, 0.0\])) should be undefined. Threw exception TypeError: context.uniform2fv is not a function]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -24,15 +24,9 @@
|
|||
[WebGL test #11: getError expected: INVALID_VALUE. Was NO_ERROR : ]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #15: context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null) should be undefined. Threw exception TypeError: context.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #16: getError expected: INVALID_OPERATION. Was NO_ERROR : ]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #18: context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0) should be undefined. Threw exception TypeError: context.framebufferTexture2D is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #19: getError expected: INVALID_OPERATION. Was NO_ERROR : ]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
[WebGL test #21: gl.isShader(fragmentShader) should be false. Threw exception TypeError: gl.isShader is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #29: gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0) threw exception TypeError: gl.framebufferTexture2D is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #30: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) should be [object WebGLTexture\]. Threw exception TypeError: gl.getFramebufferAttachmentParameter is not a function]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -45,9 +42,6 @@
|
|||
[WebGL test #45: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap)]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #69: gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo) threw exception TypeError: gl.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #70: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) should be [object WebGLRenderbuffer\]. Threw exception TypeError: gl.getFramebufferAttachmentParameter is not a function]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -60,27 +54,12 @@
|
|||
[WebGL test #74: gl.isRenderbuffer(rbo) should be false. Threw exception TypeError: gl.isRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #85: gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo) threw exception TypeError: gl.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #86: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #51: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: gl.bindTexture(gl.TEXTURE_2D, t)]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #89: gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo) threw exception TypeError: gl.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #94: gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0) threw exception TypeError: gl.framebufferTexture2D is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #100: gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo) threw exception TypeError: gl.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #104: gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0) threw exception TypeError: gl.framebufferTexture2D is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #113: gl.getParameter(gl.ARRAY_BUFFER_BINDING) should be null. Was [object WebGLBuffer\].]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -117,9 +96,72 @@
|
|||
[WebGL test #156: getError expected: NO_ERROR. Was INVALID_ENUM : after evaluating: gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #172: gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo) threw exception TypeError: gl.framebufferRenderbuffer is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #161: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #114: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) should be [object WebGLRenderbuffer\]. Threw exception TypeError: gl.getFramebufferAttachmentParameter is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #115: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) should be [object WebGLRenderbuffer\]. Threw exception TypeError: gl.getFramebufferAttachmentParameter is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #118: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 0. Threw exception TypeError: gl.getFramebufferAttachmentParameter is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #119: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 0. Threw exception TypeError: gl.getFramebufferAttachmentParameter is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #120: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Was 36061.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #121: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) should be [object WebGLRenderbuffer\]. Threw exception TypeError: gl.getFramebufferAttachmentParameter is not a function]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #145: gl.getParameter(gl.ARRAY_BUFFER_BINDING) should be null. Was [object WebGLBuffer\].]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #154: gl.getParameter(gl.ARRAY_BUFFER_BINDING) should be null. Was [object WebGLBuffer\].]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #162: gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING) should be null. Was [object WebGLBuffer\].]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #165: gl.bufferData(gl.ARRAY_BUFFER, 1, gl.STATIC_DRAW) threw exception TypeError: Value is not an object.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #168: gl.bufferData(gl.ARRAY_BUFFER, 1, gl.STATIC_DRAW) threw exception TypeError: Value is not an object.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #179: gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) should be [object WebGLBuffer\]. Was null.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #180: gl.getVertexAttrib(2, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) should be [object WebGLBuffer\]. Was null.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #181: gl.getVertexAttrib(3, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) should be [object WebGLBuffer\]. Was null.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #182: getError expected: NO_ERROR. Was INVALID_ENUM : after evaluating: gl.deleteBuffer(b2);]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #183: gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) should be [object WebGLBuffer\]. Was null.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #186: getError expected: NO_ERROR. Was INVALID_ENUM : after evaluating: gl.deleteBuffer(b1);]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #188: getError expected: NO_ERROR. Was INVALID_ENUM : after evaluating: gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #193: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #216: at (0, 0) expected: 255,0,0,255 was 0,0,0,0]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #224: at (16, 0) expected: 0,255,0,255 was 0,0,0,0]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #227: at (0, 0) expected: 0,255,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[isTests.html]
|
||||
type: testharness
|
||||
[WebGL test #0: testIs]
|
||||
expected: FAIL
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
[feedback-loop.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after draw with invalid feedback loop]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[framebuffer-object-attachment.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
expected: CRASH
|
||||
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[gl-scissor-fbo-test.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,32 @@
|
|||
[copy-tex-image-2d-formats.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[WebGL test #16: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #16: Creating framebuffer from ALPHA texture succeeded even though it is not a renderable format]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #17: Creating framebuffer from LUMINANCE texture succeeded even though it is not a renderable format]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #18: Creating framebuffer from LUMINANCE_ALPHA texture succeeded even though it is not a renderable format]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #19: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D ALPHA from RGB]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #23: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D LUMINANCE_ALPHA from RGB]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #27: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D RGBA from RGB]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #44: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D ALPHA from RGB]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #48: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D LUMINANCE_ALPHA from RGB]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #52: getError expected: INVALID_OPERATION. Was NO_ERROR : should not be able to copyTexImage2D RGBA from RGB]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[mipmap-fbo.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[texture-attachment-formats.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -10,3 +9,9 @@
|
|||
[WebGL test #1: context does not exist]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #14: at (0, 0) expected: 63,63,63,255 was 64,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #16: at (0, 0) expected: 63,63,63,63 was 64,0,0,64]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
[texture-copying-feedback-loops.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : after copyTexImage2D to same texture same level, invalid feedback loop]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #6: getError expected: INVALID_OPERATION. Was NO_ERROR : after copyTexSubImage2D to same texture same level, invalid feedback loop]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
[texture-fakeblack.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[WebGL test #0: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1: at (0, 0) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #3: at (0, 0) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue