Add makeXRCompatible for WebGL2, update WebXR WPT expectations (#33097)

* Add makeXRCompatible to WebGLRenderContextBase

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Activate webgl2 for webxr wpt, update meta expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update meta legacy layout expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Remove no longer existing expectations from meta files

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Remove files for fully passing tests

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Remove out-of-date expectations from meta legacy layout

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update webgl conformance expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Fix test numbering in expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
Daniel Adams 2024-08-18 00:37:14 -10:00 committed by GitHub
parent 280063eee2
commit 1ef3e107bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
115 changed files with 53 additions and 762 deletions

View file

@ -5,6 +5,7 @@
use std::cell::Cell;
use std::cmp;
use std::ptr::{self, NonNull};
use std::rc::Rc;
use canvas_traits::webgl::WebGLError::*;
use canvas_traits::webgl::{
@ -42,6 +43,7 @@ use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom};
use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutCanvasRenderingContextHelpers};
use crate::dom::promise::Promise;
use crate::dom::webgl_validations::tex_image_2d::{
TexImage2DValidator, TexImage2DValidatorResult, TexStorageValidator, TexStorageValidatorResult,
};
@ -4471,6 +4473,14 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
) {
self.tex_storage(3, target, levels, internal_format, width, height, depth)
}
/// <https://immersive-web.github.io/webxr/#dom-webglrenderingcontextbase-makexrcompatible>
fn MakeXRCompatible(&self) -> Rc<Promise> {
// XXXManishearth Fill in with compatibility checks when rust-webxr supports this
let p = Promise::new(&self.global());
p.resolve_native(&());
p
}
}
impl LayoutCanvasRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> {