From 2ff1851a168b10dbe3c665feae66ea5dc773bcb1 Mon Sep 17 00:00:00 2001 From: Alexey Knyazev <3479527+lexaknyazev@users.noreply.github.com> Date: Tue, 30 Jun 2026 00:00:00 +0000 Subject: [PATCH] WEBGL_render_shared_exponent: Update color writemask validation Original language was based on the Vulkan spec that required only red, green, and blue color writemask values to be the same. It turned out that some GPUs apply the alpha writemask to the shared exponent component. As a result of that discovery, the Vulkan spec has been updated (1.4.355, dd June 26, 2026) to require all color writemask values to be the same for color attachments with the shared exponent pixel format. Since the same requirement exists in Metal and Direct3D, the WebGL extension is updated to match native APIs. New validation is implemented in Chromium since 152.0.7926.0. --- .../WEBGL_render_shared_exponent/extension.xml | 5 ++++- .../extensions/webgl-render-shared-exponent.html | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/extensions/WEBGL_render_shared_exponent/extension.xml b/extensions/WEBGL_render_shared_exponent/extension.xml index b27a3f001..0bff64613 100644 --- a/extensions/WEBGL_render_shared_exponent/extension.xml +++ b/extensions/WEBGL_render_shared_exponent/extension.xml @@ -20,7 +20,7 @@ name="QCOM_render_shared_exponent"> Clearing or drawing to a shared exponent color buffer will generate INVALID_OPERATION - if the associated color write mask has different values for red, green, and blue channels. + if the associated color write mask has different values for red, green, blue, and alpha channels. @@ -44,5 +44,8 @@ interface WEBGL_render_shared_exponent { Promoted to Community Approved. + + Adjusted color write mask validation to require the same state for all channels. + diff --git a/sdk/tests/conformance2/extensions/webgl-render-shared-exponent.html b/sdk/tests/conformance2/extensions/webgl-render-shared-exponent.html index 11d505fcc..f386fb315 100644 --- a/sdk/tests/conformance2/extensions/webgl-render-shared-exponent.html +++ b/sdk/tests/conformance2/extensions/webgl-render-shared-exponent.html @@ -159,8 +159,6 @@ function expectError(enabled, effectiveMask, operation) { if (!enabled || effectiveMask == 0x0 /* 0000 */ || - effectiveMask == 0x8 /* 000A */ || - effectiveMask == 0x7 /* RGB0 */ || effectiveMask == 0xF /* RGBA */ ) { wtu.glErrorShouldBe(gl, gl.NO_ERROR, operation); } else { @@ -210,9 +208,21 @@ dbiExt.colorMaskiOES(0, true, false, false, false); runOps(enabled, 1); // overridden - debug("Setting compatible color mask on RGB9_E5 draw buffer") + debug("Setting incompatible color mask on RGB9_E5 draw buffer") dbiExt.colorMaskiOES(0, true, true, true, false); runOps(enabled, 7); // overridden + + debug("Setting incompatible color mask on RGB9_E5 draw buffer") + dbiExt.colorMaskiOES(0, false, false, false, true); + runOps(enabled, 8); // overridden + + debug("Setting compatible color mask on RGB9_E5 draw buffer") + dbiExt.colorMaskiOES(0, false, false, false, false); + runOps(enabled, 0); // overridden + + debug("Setting compatible color mask on RGB9_E5 draw buffer") + dbiExt.colorMaskiOES(0, true, true, true, true); + runOps(enabled, 15); // overridden } } }