diff --git a/extensions/WEBGL_shader_pixel_local_storage/extension.xml b/extensions/WEBGL_shader_pixel_local_storage/extension.xml
index 663c3df81..47058abb5 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.
@@ -266,6 +270,7 @@ interface WEBGL_shader_pixel_local_storage {
| PIXEL_LOCAL_TEXTURE_NAME_WEBGL | WebGLTexture? |
| PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL | GLint |
| PIXEL_LOCAL_TEXTURE_LAYER_WEBGL | GLint |
+ | PIXEL_LOCAL_USAGE_WEBGL | GLbitfield |
| PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL | Float32Array |
| PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL | Int32Array |
| PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL | Uint32Array |
@@ -283,5 +288,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..0a421fee4 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() {
@@ -182,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),
@@ -211,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, " +
@@ -220,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);
@@ -294,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`);
@@ -323,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);