From fe888ed01cf5dfbd4a77187497c28028da9a2ae3 Mon Sep 17 00:00:00 2001 From: Kenneth Russell Date: Fri, 20 Feb 2026 17:24:29 -0800 Subject: [PATCH 1/2] Revise WEBGL_shader_pixel_local_storage extension. Add noncoherent usage flag, and renumber enums, to track the current ANGLE extension. Tested against the revised extension implementation in Chromium. Associated with https://issues.angleproject.org/issues/40096838 . --- .../extension.xml | 15 +++++++++++---- .../webgl-shader-pixel-local-storage.html | 8 +++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/extensions/WEBGL_shader_pixel_local_storage/extension.xml b/extensions/WEBGL_shader_pixel_local_storage/extension.xml index 663c3df81..bac7e4659 100644 --- a/extensions/WEBGL_shader_pixel_local_storage/extension.xml +++ b/extensions/WEBGL_shader_pixel_local_storage/extension.xml @@ -78,14 +78,17 @@ interface WEBGL_shader_pixel_local_storage { const GLenum PIXEL_LOCAL_TEXTURE_NAME_WEBGL = 0x96E8; const GLenum PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL = 0x96E9; const GLenum PIXEL_LOCAL_TEXTURE_LAYER_WEBGL = 0x96EA; - const GLenum PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL = 0x96EB; - const GLenum PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL = 0x96EC; - const GLenum PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL = 0x96ED; + const GLenum PIXEL_LOCAL_USAGE_WEBGL = 0x96EB; + const GLenum PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL = 0x96EC; + const GLenum PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL = 0x96ED; + const GLenum PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL = 0x96EE; + const GLenum PIXEL_LOCAL_USAGE_ALWAYS_NONCOHERENT_BIT_WEBGL = 0x1; GLboolean isCoherent(); undefined framebufferTexturePixelLocalStorageWEBGL(GLint plane, WebGLTexture? texture, GLint level, - GLint layer); + GLint layer, + GLbitfield usage); undefined framebufferPixelLocalClearValuefvWEBGL(GLint plane, Float32List value, optional unsigned long long srcOffset = 0); @@ -121,6 +124,7 @@ interface WEBGL_shader_pixel_local_storage { +

Establishes the backing texture for the given plane.

@@ -283,5 +287,8 @@ interface WEBGL_shader_pixel_local_storage { Removed MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_WEBGL enum, which was removed from the underlying ANGLE extension. + + Added non-coherent "usage" flag and revised enum values, tracking ANGLE extension. + diff --git a/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html b/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html index e92e3624d..02d0b78c8 100644 --- a/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html +++ b/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html @@ -130,9 +130,11 @@ shouldBe("pls.PIXEL_LOCAL_TEXTURE_NAME_WEBGL", "0x96E8"); shouldBe("pls.PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL", "0x96E9"); shouldBe("pls.PIXEL_LOCAL_TEXTURE_LAYER_WEBGL", "0x96EA"); - shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL", "0x96EB"); - shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL", "0x96EC"); - shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL", "0x96ED"); + shouldBe("pls.PIXEL_LOCAL_USAGE_WEBGL", "0x96EB"); + shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL", "0x96EC"); + shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL", "0x96ED"); + shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL", "0x96EE"); + shouldBe("pls.PIXEL_LOCAL_USAGE_ALWAYS_NONCOHERENT_BIT_WEBGL", "0x1"); } function checkImplementationDependentLimits() { From c6ccdc48a7038df36ddc95f4daae9cf34bb38f8d Mon Sep 17 00:00:00 2001 From: Kenneth Russell Date: Mon, 23 Feb 2026 12:57:16 -0800 Subject: [PATCH 2/2] Address review feedback from Alexey. Specify and test PLS framebuffer query of PIXEL_LOCAL_USAGE_WEGBL, and add usage parameter to framebufferTexturePixelLocalStorageWEBGL calls in the test. --- .../WEBGL_shader_pixel_local_storage/extension.xml | 1 + .../extensions/webgl-shader-pixel-local-storage.html | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/extensions/WEBGL_shader_pixel_local_storage/extension.xml b/extensions/WEBGL_shader_pixel_local_storage/extension.xml index bac7e4659..47058abb5 100644 --- a/extensions/WEBGL_shader_pixel_local_storage/extension.xml +++ b/extensions/WEBGL_shader_pixel_local_storage/extension.xml @@ -270,6 +270,7 @@ interface WEBGL_shader_pixel_local_storage { PIXEL_LOCAL_TEXTURE_NAME_WEBGLWebGLTexture? PIXEL_LOCAL_TEXTURE_LEVEL_WEBGLGLint PIXEL_LOCAL_TEXTURE_LAYER_WEBGLGLint + PIXEL_LOCAL_USAGE_WEBGLGLbitfield PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGLFloat32Array PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGLInt32Array PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGLUint32Array diff --git a/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html b/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html index 02d0b78c8..0a421fee4 100644 --- a/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html +++ b/sdk/tests/conformance2/extensions/webgl-shader-pixel-local-storage.html @@ -184,6 +184,8 @@ i, pls.PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL) == 0); expectTrue(pls.getFramebufferPixelLocalStorageParameterWEBGL( i, pls.PIXEL_LOCAL_TEXTURE_LAYER_WEBGL) == 0); + expectTrue(pls.getFramebufferPixelLocalStorageParameterWEBGL( + i, pls.PIXEL_LOCAL_USAGE_WEBGL) == 0); expectTrue(arraysEqual( pls.getFramebufferPixelLocalStorageParameterWEBGL( i, pls.PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL), @@ -213,7 +215,7 @@ gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA8, 1, 1); wtu.glErrorShouldBe(gl, gl.NONE); gl.deleteTexture(tex); - pls.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0); + pls.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0, 0); wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); debug("\nIf 'texture' was generated by a different WebGL2RenderingContext than this one, " + @@ -222,7 +224,7 @@ const tex2 = gl2.createTexture(); gl2.bindTexture(gl2.TEXTURE_2D, tex2); gl2.texStorage2D(gl2.TEXTURE_2D, 1, gl2.RGBA8, 1, 1); - pls.framebufferTexturePixelLocalStorageWEBGL(0, tex2, 0, 0); + pls.framebufferTexturePixelLocalStorageWEBGL(0, tex2, 0, 0, 0); wtu.glErrorShouldBe(gl2, gl2.NONE); wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); @@ -296,10 +298,10 @@ gl.bindTexture(gl.TEXTURE_2D, validTex); gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA8, 1, 1); wtu.glErrorShouldBe(gl, gl.NONE); - pls.framebufferTexturePixelLocalStorageWEBGL(0, validTex, 0, 0); + pls.framebufferTexturePixelLocalStorageWEBGL(0, validTex, 0, 0, 0); shouldBeTrue(`pls.getFramebufferPixelLocalStorageParameterWEBGL( 0, pls.PIXEL_LOCAL_TEXTURE_NAME_WEBGL) === validTex`); - pls.framebufferTexturePixelLocalStorageWEBGL(0, null, 0, 0); + pls.framebufferTexturePixelLocalStorageWEBGL(0, null, 0, 0, 0); shouldBeTrue(`pls.getFramebufferPixelLocalStorageParameterWEBGL( 0, pls.PIXEL_LOCAL_TEXTURE_NAME_WEBGL) === null`); @@ -325,7 +327,7 @@ const plsFBO = localGL.createFramebuffer(); localGL.bindFramebuffer(localGL.FRAMEBUFFER, plsFBO); - localPLS.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0); + localPLS.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0, 0); wtu.glErrorShouldBe(localGL, localGL.NONE); localGL.viewport(0, 0, localCanvas.width, localCanvas.height);