From a06b04b8086dcc50db2dc1c58fa2e4b710bcc4bc Mon Sep 17 00:00:00 2001 From: Ken Russell Date: Thu, 21 Sep 2023 23:04:20 -0700 Subject: [PATCH] In new WebGL 2-only Wasm tests, fetch WebGL 2.0 context directly. (#3594) This makes them runnable by navigating to them outside of the test harness and without URL query parameters. Follow-on to #3592. --- sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/readpixels-4gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/teximage2d-4gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html | 2 +- sdk/tests/conformance2/wasm/texsubimage2d-4gb-wasm-memory.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html index 06a1bf7fc..af74678dd 100644 --- a/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/readpixels-16gb-wasm-memory.html @@ -23,7 +23,7 @@ debug("Tests that gl.readPixels() can be called on WebAssembly Memory of 16GB in size."); debug(""); let wtu = WebGLTestUtils; -let gl = wtu.create3DContext("canvas"); +let gl = wtu.create3DContext("canvas", undefined, 2); const PAGE = 65536; const SIZE = 16*1024*1024*1024; diff --git a/sdk/tests/conformance2/wasm/readpixels-4gb-wasm-memory.html b/sdk/tests/conformance2/wasm/readpixels-4gb-wasm-memory.html index c1ff463e8..f97a3ccba 100644 --- a/sdk/tests/conformance2/wasm/readpixels-4gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/readpixels-4gb-wasm-memory.html @@ -22,7 +22,7 @@ debug("Tests that gl.readPixels() can be called on WebAssembly Memory of 4GB in size."); debug(""); let wtu = WebGLTestUtils; -let gl = wtu.create3DContext("canvas"); +let gl = wtu.create3DContext("canvas", undefined, 2); const PAGE = 65536; const SIZE = 4*1024*1024*1024 - PAGE; // when uint32_t size is max, we can only reach one page short of full 4GB diff --git a/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html index f1ec6755a..8ce511195 100644 --- a/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/teximage2d-16gb-wasm-memory.html @@ -22,7 +22,7 @@ debug("Tests that gl.texImage2D() can be called on WebAssembly Memory 16GB in size."); debug(""); let wtu = WebGLTestUtils; -var gl = wtu.create3DContext("canvas"); +let gl = wtu.create3DContext("canvas", undefined, 2); const PAGE = 65536; const SIZE = 16*1024*1024*1024; diff --git a/sdk/tests/conformance2/wasm/teximage2d-4gb-wasm-memory.html b/sdk/tests/conformance2/wasm/teximage2d-4gb-wasm-memory.html index 33f3a10cf..5d6897347 100644 --- a/sdk/tests/conformance2/wasm/teximage2d-4gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/teximage2d-4gb-wasm-memory.html @@ -22,7 +22,7 @@ debug("Tests that gl.texImage2D() can be called on WebAssembly Memory 4GB in size."); debug(""); let wtu = WebGLTestUtils; -var gl = wtu.create3DContext("canvas"); +let gl = wtu.create3DContext("canvas", undefined, 2); const PAGE = 65536; const SIZE = 4*1024*1024*1024 - PAGE; // when uint32_t size is max, we can only reach one page short of full 4GB diff --git a/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html b/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html index d1820808d..328d42ec4 100644 --- a/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/texsubimage2d-16gb-wasm-memory.html @@ -22,7 +22,7 @@ debug("Tests that gl.texSubImage2D() can be called on WebAssembly Memory 16GB in size."); debug(""); let wtu = WebGLTestUtils; -var gl = wtu.create3DContext("canvas"); +let gl = wtu.create3DContext("canvas", undefined, 2); const PAGE = 65536; const SIZE = 16*1024*1024*1024; diff --git a/sdk/tests/conformance2/wasm/texsubimage2d-4gb-wasm-memory.html b/sdk/tests/conformance2/wasm/texsubimage2d-4gb-wasm-memory.html index e396b11fe..d7756629a 100644 --- a/sdk/tests/conformance2/wasm/texsubimage2d-4gb-wasm-memory.html +++ b/sdk/tests/conformance2/wasm/texsubimage2d-4gb-wasm-memory.html @@ -22,7 +22,7 @@ debug("Tests that gl.texSubImage2D() can be called on WebAssembly Memory 4GB in size."); debug(""); let wtu = WebGLTestUtils; -var gl = wtu.create3DContext("canvas"); +let gl = wtu.create3DContext("canvas", undefined, 2); const PAGE = 65536; const SIZE = 4*1024*1024*1024 - PAGE; // when uint32_t size is max, we can only reach one page short of full 4GB