aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMátyás Mustoha <matyas.mustoha@h-lab.eu>2020-02-25 10:47:59 +0100
committerMátyás Mustoha <matyas.mustoha@h-lab.eu>2020-03-16 12:17:15 +0100
commit0afe27ef18e1bb458863bd881c79d0fa63d9c4a4 (patch)
tree20d762f9809d0eee4e8301def5ac513da9f09384
parente8e0b702662704572e7c04a78d0ab9e023a0ad5c (diff)
downloadservo-0afe27ef18e1bb458863bd881c79d0fa63d9c4a4.tar.gz
servo-0afe27ef18e1bb458863bd881c79d0fa63d9c4a4.zip
Add support for WebGL2 read and draw buffer settings
Adds support for the `ReadBuffer` and `DrawBuffers` WebGL2 calls and the related parameter getters. See: - https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2 - https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4 - https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.11
-rw-r--r--components/canvas/webgl_thread.rs2
-rw-r--r--components/canvas_traits/webgl.rs2
-rw-r--r--components/script/dom/webgl2renderingcontext.rs69
-rw-r--r--components/script/dom/webglframebuffer.rs53
-rw-r--r--components/script/dom/webglrenderingcontext.rs5
-rw-r--r--components/script/dom/webidls/WebGL2RenderingContext.webidl4
-rw-r--r--tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini32
-rw-r--r--tests/wpt/webgl/meta/conformance2/renderbuffers/readbuffer.html.ini2
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html.ini105
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/clear-func-buffer-type-match.html.ini2
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini42
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/framebuffer-completeness-unaffected.html.ini5
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/fs-color-type-mismatch-color-buffer-type.html.ini2
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/read-draw-when-missing-image.html.ini11
-rw-r--r--tests/wpt/webgl/meta/conformance2/rendering/rendering-sampling-feedback-loop.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance2/state/gl-get-calls.html.ini6
-rw-r--r--tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini18
17 files changed, 315 insertions, 51 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index 3ab38995e8d..ff627d121ad 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -2024,6 +2024,8 @@ impl WebGLImpl {
attach(attachment)
}
},
+ WebGLCommand::ReadBuffer(buffer) => gl.read_buffer(buffer),
+ WebGLCommand::DrawBuffers(ref buffers) => gl.draw_buffers(buffers),
}
// If debug asertions are enabled, then check the error state.
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs
index 3b943200d71..d5be8822ee9 100644
--- a/components/canvas_traits/webgl.rs
+++ b/components/canvas_traits/webgl.rs
@@ -546,6 +546,8 @@ pub enum WebGLCommand {
InvalidateFramebuffer(u32, Vec<u32>),
InvalidateSubFramebuffer(u32, Vec<u32>, i32, i32, i32, i32),
FramebufferTextureLayer(u32, u32, Option<WebGLTextureId>, i32, i32),
+ ReadBuffer(u32),
+ DrawBuffers(Vec<u32>),
}
macro_rules! nonzero_type {
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs
index dabcd4cf54e..c0c3aab5ad6 100644
--- a/components/script/dom/webgl2renderingcontext.rs
+++ b/components/script/dom/webgl2renderingcontext.rs
@@ -96,6 +96,8 @@ pub struct WebGL2RenderingContext {
texture_pack_skip_pixels: Cell<usize>,
texture_pack_skip_rows: Cell<usize>,
enable_rasterizer_discard: Cell<bool>,
+ default_fb_readbuffer: Cell<u32>,
+ default_fb_drawbuffer: Cell<u32>,
}
fn typedarray_elem_size(typeid: Type) -> usize {
@@ -162,6 +164,8 @@ impl WebGL2RenderingContext {
texture_pack_skip_pixels: Cell::new(0),
texture_pack_skip_rows: Cell::new(0),
enable_rasterizer_discard: Cell::new(false),
+ default_fb_readbuffer: Cell::new(constants::BACK),
+ default_fb_drawbuffer: Cell::new(constants::BACK),
})
}
@@ -344,6 +348,11 @@ impl WebGL2RenderingContext {
return self.base.webgl_error(InvalidOperation);
}
+ let fb_slot = self.base.get_draw_framebuffer_slot();
+ if fb_slot.get().is_none() && self.default_fb_readbuffer.get() == constants::NONE {
+ return self.base.webgl_error(InvalidOperation);
+ }
+
let dst_byte_offset = {
let dst_elem_size = typedarray_elem_size(dst.get_array_type());
dst_elem_offset as usize * dst_elem_size
@@ -800,6 +809,26 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
&self.base.get_read_framebuffer_slot().get()
);
},
+ constants::READ_BUFFER => {
+ let buffer = match self.base.get_read_framebuffer_slot().get() {
+ Some(fb) => fb.read_buffer(),
+ None => self.default_fb_readbuffer.get(),
+ };
+ return UInt32Value(buffer);
+ },
+ constants::DRAW_BUFFER0..=constants::DRAW_BUFFER15 => {
+ let buffer = match self.base.get_read_framebuffer_slot().get() {
+ Some(fb) => {
+ let idx = parameter - constants::DRAW_BUFFER0;
+ fb.draw_buffer_i(idx as usize)
+ },
+ None if parameter == constants::DRAW_BUFFER0 => {
+ self.default_fb_readbuffer.get()
+ },
+ None => constants::NONE,
+ };
+ return UInt32Value(buffer);
+ },
_ => {},
}
@@ -3811,6 +3840,46 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
self.base
.renderbuffer_storage(target, samples, internal_format, width, height)
}
+
+ /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
+ fn ReadBuffer(&self, src: u32) {
+ match src {
+ constants::BACK | constants::NONE => {},
+ _ if self.base.valid_color_attachment_enum(src) => {},
+ _ => return self.base.webgl_error(InvalidEnum),
+ }
+
+ if let Some(fb) = self.base.get_read_framebuffer_slot().get() {
+ handle_potential_webgl_error!(self.base, fb.set_read_buffer(src), return)
+ } else {
+ match src {
+ constants::NONE | constants::BACK => {},
+ _ => return self.base.webgl_error(InvalidOperation),
+ }
+
+ self.default_fb_readbuffer.set(src);
+ self.base.send_command(WebGLCommand::ReadBuffer(src));
+ }
+ }
+
+ /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.11
+ fn DrawBuffers(&self, buffers: Vec<u32>) {
+ if let Some(fb) = self.base.get_draw_framebuffer_slot().get() {
+ handle_potential_webgl_error!(self.base, fb.set_draw_buffers(buffers), return)
+ } else {
+ if buffers.len() != 1 {
+ return self.base.webgl_error(InvalidOperation);
+ }
+
+ match buffers[0] {
+ constants::NONE | constants::BACK => {},
+ _ => return self.base.webgl_error(InvalidOperation),
+ }
+
+ self.default_fb_drawbuffer.set(buffers[0]);
+ self.base.send_command(WebGLCommand::DrawBuffers(buffers));
+ }
+ }
}
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<WebGL2RenderingContext> {
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs
index 2d6fcf9122d..f3f6e939f4f 100644
--- a/components/script/dom/webglframebuffer.rs
+++ b/components/script/dom/webglframebuffer.rs
@@ -101,6 +101,8 @@ pub struct WebGLFramebuffer {
depth: DomRefCell<Option<WebGLFramebufferAttachment>>,
stencil: DomRefCell<Option<WebGLFramebufferAttachment>>,
depthstencil: DomRefCell<Option<WebGLFramebufferAttachment>>,
+ color_read_buffer: DomRefCell<u32>,
+ color_draw_buffers: DomRefCell<Vec<u32>>,
is_initialized: Cell<bool>,
// Framebuffers for XR keep a reference to the XR session.
// https://github.com/immersive-web/webxr/issues/856
@@ -121,6 +123,8 @@ impl WebGLFramebuffer {
depth: DomRefCell::new(None),
stencil: DomRefCell::new(None),
depthstencil: DomRefCell::new(None),
+ color_read_buffer: DomRefCell::new(constants::COLOR_ATTACHMENT0),
+ color_draw_buffers: DomRefCell::new(vec![constants::COLOR_ATTACHMENT0]),
is_initialized: Cell::new(false),
xr_session: Default::default(),
}
@@ -914,6 +918,55 @@ impl WebGLFramebuffer {
});
}
+ pub fn set_read_buffer(&self, buffer: u32) -> WebGLResult<()> {
+ let context = self.upcast::<WebGLObject>().context();
+
+ match buffer {
+ constants::NONE => {},
+ _ if context.valid_color_attachment_enum(buffer) => {},
+ _ => return Err(WebGLError::InvalidOperation),
+ };
+
+ *self.color_read_buffer.borrow_mut() = buffer;
+ context.send_command(WebGLCommand::ReadBuffer(buffer));
+ Ok(())
+ }
+
+ pub fn set_draw_buffers(&self, buffers: Vec<u32>) -> WebGLResult<()> {
+ let context = self.upcast::<WebGLObject>().context();
+
+ if buffers.len() > context.limits().max_draw_buffers as usize {
+ return Err(WebGLError::InvalidValue);
+ }
+
+ let enums_valid = buffers
+ .iter()
+ .all(|&val| val == constants::NONE || context.valid_color_attachment_enum(val));
+ if !enums_valid {
+ return Err(WebGLError::InvalidEnum);
+ }
+
+ let values_valid = buffers.iter().enumerate().all(|(i, &val)| {
+ val == constants::NONE || val == (constants::COLOR_ATTACHMENT0 + i as u32)
+ });
+ if !values_valid {
+ return Err(WebGLError::InvalidOperation);
+ }
+
+ *self.color_draw_buffers.borrow_mut() = buffers.clone();
+ context.send_command(WebGLCommand::DrawBuffers(buffers));
+ Ok(())
+ }
+
+ pub fn read_buffer(&self) -> u32 {
+ *self.color_read_buffer.borrow()
+ }
+
+ pub fn draw_buffer_i(&self, index: usize) -> u32 {
+ let buffers = &*self.color_draw_buffers.borrow();
+ *buffers.get(index).unwrap_or(&constants::NONE)
+ }
+
pub fn target(&self) -> Option<u32> {
self.target.get()
}
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 9f30edac79c..25e5bf4baa1 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -1510,6 +1510,11 @@ impl WebGLRenderingContext {
// FIXME: https://github.com/servo/servo/issues/13710
}
+
+ pub fn valid_color_attachment_enum(&self, attachment: u32) -> bool {
+ let last_slot = constants::COLOR_ATTACHMENT0 + self.limits().max_color_attachments - 1;
+ constants::COLOR_ATTACHMENT0 <= attachment && attachment <= last_slot
+ }
}
#[cfg(not(feature = "webgl_backtrace"))]
diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl
index c08bcb044b8..dca86da39fe 100644
--- a/components/script/dom/webidls/WebGL2RenderingContext.webidl
+++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl
@@ -313,7 +313,7 @@ interface mixin WebGL2RenderingContextBase
void invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
void invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments,
GLint x, GLint y, GLsizei width, GLsizei height);
- // void readBuffer(GLenum src);
+ void readBuffer(GLenum src);
/* Renderbuffer objects */
any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
@@ -475,7 +475,7 @@ interface mixin WebGL2RenderingContextBase
/*[AllowShared]*/ ArrayBufferView dstData, GLuint dstOffset);
/* Multiple Render Targets */
- // void drawBuffers(sequence<GLenum> buffers);
+ void drawBuffers(sequence<GLenum> buffers);
void clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values,
optional GLuint srcOffset = 0);
diff --git a/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini b/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini
index ace9681c8eb..100b5866388 100644
--- a/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/context/methods-2.html.ini
@@ -1,52 +1,46 @@
[methods-2.html]
- [WebGL test #2: Property either does not exist or is not a function: readBuffer]
- expected: FAIL
-
[WebGL test #1: Property either does not exist or is not a function: blitFramebuffer]
expected: FAIL
- [WebGL test #11: Property either does not exist or is not a function: vertexAttribI4iv]
- expected: FAIL
-
- [WebGL test #8: Property either does not exist or is not a function: compressedTexImage3D]
+ [WebGL test #7: Property either does not exist or is not a function: compressedTexImage3D]
expected: FAIL
- [WebGL test #13: Property either does not exist or is not a function: vertexAttribI4uiv]
+ [WebGL test #4: Property either does not exist or is not a function: texStorage3D]
expected: FAIL
- [WebGL test #16: Property either does not exist or is not a function: drawBuffers]
+ [WebGL test #11: Property either does not exist or is not a function: vertexAttribI4ui]
expected: FAIL
- [WebGL test #3: 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
- [WebGL test #10: Property either does not exist or is not a function: vertexAttribI4i]
+ [WebGL test #12: Property either does not exist or is not a function: vertexAttribI4uiv]
expected: FAIL
- [WebGL test #9: Property either does not exist or is not a function: compressedTexSubImage3D]
+ [WebGL test #3: Property either does not exist or is not a function: texStorage2D]
expected: FAIL
- [WebGL test #12: Property either does not exist or is not a function: vertexAttribI4ui]
+ [WebGL test #8: Property either does not exist or is not a function: compressedTexSubImage3D]
expected: FAIL
[WebGL test #0: Property either does not exist or is not a function: isContextLost]
expected: FAIL
- [WebGL test #7: Property either does not exist or is not a function: copyTexSubImage3D]
+ [WebGL test #9: Property either does not exist or is not a function: vertexAttribI4i]
expected: FAIL
- [WebGL test #14: Property either does not exist or is not a function: vertexAttribIPointer]
+ [WebGL test #13: Property either does not exist or is not a function: vertexAttribIPointer]
expected: FAIL
- [WebGL test #4: Property either does not exist or is not a function: texStorage2D]
+ [WebGL test #14: Property either does not exist or is not a function: drawRangeElements]
expected: FAIL
- [WebGL test #15: Property either does not exist or is not a function: drawRangeElements]
+ [WebGL test #5: Property either does not exist or is not a function: texSubImage3D]
expected: FAIL
- [WebGL test #6: Property either does not exist or is not a function: texSubImage3D]
+ [WebGL test #10: Property either does not exist or is not a function: vertexAttribI4iv]
expected: FAIL
- [WebGL test #5: Property either does not exist or is not a function: texStorage3D]
+ [WebGL test #6: Property either does not exist or is not a function: copyTexSubImage3D]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/renderbuffers/readbuffer.html.ini b/tests/wpt/webgl/meta/conformance2/renderbuffers/readbuffer.html.ini
index 5d2bfb385a5..232dfdd8524 100644
--- a/tests/wpt/webgl/meta/conformance2/renderbuffers/readbuffer.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/renderbuffers/readbuffer.html.ini
@@ -1,5 +1,5 @@
[readbuffer.html]
- expected: ERROR
+ expected: TIMEOUT
[WebGL test #3: gl.getParameter(gl.READ_BUFFER) should be 1029 (of type number). Was null (of type object).]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html.ini
index 615333948ac..6e960398105 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html.ini
@@ -1,8 +1,109 @@
[blitframebuffer-srgb-and-linear-drawbuffers.html]
- expected: ERROR
+ [WebGL test #10: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
+ expected: FAIL
+
+ [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 #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
+ [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
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/clear-func-buffer-type-match.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/clear-func-buffer-type-match.html.ini
index b711ea2d3c7..eae2c252214 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/clear-func-buffer-type-match.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/clear-func-buffer-type-match.html.ini
@@ -1,5 +1,5 @@
[clear-func-buffer-type-match.html]
- expected: ERROR
+ expected: TIMEOUT
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini
index f5a106b6c71..9c96659618a 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini
@@ -1,5 +1,43 @@
[draw-buffers.html]
- expected: ERROR
- [WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
+ [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
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/framebuffer-completeness-unaffected.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/framebuffer-completeness-unaffected.html.ini
deleted file mode 100644
index 31e5e1e855c..00000000000
--- a/tests/wpt/webgl/meta/conformance2/rendering/framebuffer-completeness-unaffected.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[framebuffer-completeness-unaffected.html]
- expected: ERROR
- [WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
- expected: FAIL
-
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/fs-color-type-mismatch-color-buffer-type.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/fs-color-type-mismatch-color-buffer-type.html.ini
index 861cb782158..a63bce3601f 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/fs-color-type-mismatch-color-buffer-type.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/fs-color-type-mismatch-color-buffer-type.html.ini
@@ -1,5 +1,5 @@
[fs-color-type-mismatch-color-buffer-type.html]
- expected: ERROR
+ expected: TIMEOUT
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/read-draw-when-missing-image.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/read-draw-when-missing-image.html.ini
index 511d437a930..47ce7fd0715 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/read-draw-when-missing-image.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/read-draw-when-missing-image.html.ini
@@ -1,8 +1,17 @@
[read-draw-when-missing-image.html]
expected: ERROR
+ [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 #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
+ [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
diff --git a/tests/wpt/webgl/meta/conformance2/rendering/rendering-sampling-feedback-loop.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/rendering-sampling-feedback-loop.html.ini
index 9a29f0113d0..d9d3b521cb1 100644
--- a/tests/wpt/webgl/meta/conformance2/rendering/rendering-sampling-feedback-loop.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/rendering/rendering-sampling-feedback-loop.html.ini
@@ -1,5 +1,7 @@
[rendering-sampling-feedback-loop.html]
- expected: ERROR
- [WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
+ [WebGL test #2: getError expected: INVALID_OPERATION. Was NO_ERROR : Rendering to a texture where it samples from should geneates INVALID_OPERATION. Otherwise, it should be NO_ERROR]
+ expected: FAIL
+
+ [WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : Rendering to a texture where it samples from should geneates INVALID_OPERATION. Otherwise, it should be NO_ERROR]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/state/gl-get-calls.html.ini b/tests/wpt/webgl/meta/conformance2/state/gl-get-calls.html.ini
index 37ba9d9f5dc..2b3a626bd9c 100644
--- a/tests/wpt/webgl/meta/conformance2/state/gl-get-calls.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/state/gl-get-calls.html.ini
@@ -1,7 +1,4 @@
[gl-get-calls.html]
- [WebGL test #13: context.getParameter(context.READ_BUFFER) should be 1029 (of type number). Was null (of type object).]
- expected: FAIL
-
[WebGL test #47: context.getParameter(context.MAX_FRAGMENT_INPUT_COMPONENTS) should be >= 60. Was null (of type object).]
expected: FAIL
@@ -23,9 +20,6 @@
[WebGL test #56: context.getParameter(context.MAX_PROGRAM_TEXEL_OFFSET) is not an instance of Number]
expected: FAIL
- [WebGL test #4: context.getParameter(context.DRAW_BUFFER0) should be 1029 (of type number). Was null (of type object).]
- expected: FAIL
-
[WebGL test #45: context.getParameter(context.MAX_ELEMENTS_INDICES) is not an instance of Number]
expected: FAIL
diff --git a/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini b/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini
index 4a27c171b93..a9ee7d9ac81 100644
--- a/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini
+++ b/tests/wpt/webgl/meta/conformance2/state/gl-object-get-calls.html.ini
@@ -24,6 +24,9 @@
[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 #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
+ 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
@@ -45,9 +48,15 @@
[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 #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 #203: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_LEVELS) should be 0 (of type number). Was null (of type object).]
expected: FAIL
+ [WebGL test #5: getBufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
+ expected: FAIL
+
[WebGL test #22: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
expected: FAIL
@@ -87,12 +96,3 @@
[WebGL test #274: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
- [WebGL test #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
- 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 #5: getBufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
- expected: FAIL
-