Skip to content

Commit 3d8e748

Browse files
authored
WEBGL_render_shared_exponent: Update color writemask validation (#3780)
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.
1 parent 9dca31c commit 3d8e748

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

‎extensions/WEBGL_render_shared_exponent/extension.xml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
name="QCOM_render_shared_exponent">
2121
<addendum>
2222
Clearing or drawing to a shared exponent color buffer will generate <code>INVALID_OPERATION</code>
23-
if the associated color write mask has different values for red, green, and blue channels.
23+
if the associated color write mask has different values for red, green, blue, and alpha channels.
2424
</addendum>
2525
</mirrors>
2626

@@ -44,5 +44,8 @@ interface WEBGL_render_shared_exponent {
4444
<revision date="2024/01/25">
4545
<change>Promoted to Community Approved.</change>
4646
</revision>
47+
<revision date="2026/06/30">
48+
<change>Adjusted color write mask validation to require the same state for all channels.</change>
49+
</revision>
4750
</history>
4851
</extension>

‎sdk/tests/conformance2/extensions/webgl-render-shared-exponent.html‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@
159159
function expectError(enabled, effectiveMask, operation) {
160160
if (!enabled ||
161161
effectiveMask == 0x0 /* 0000 */ ||
162-
effectiveMask == 0x8 /* 000A */ ||
163-
effectiveMask == 0x7 /* RGB0 */ ||
164162
effectiveMask == 0xF /* RGBA */ ) {
165163
wtu.glErrorShouldBe(gl, gl.NO_ERROR, operation);
166164
} else {
@@ -210,9 +208,21 @@
210208
dbiExt.colorMaskiOES(0, true, false, false, false);
211209
runOps(enabled, 1); // overridden
212210

213-
debug("Setting compatible color mask on RGB9_E5 draw buffer")
211+
debug("Setting incompatible color mask on RGB9_E5 draw buffer")
214212
dbiExt.colorMaskiOES(0, true, true, true, false);
215213
runOps(enabled, 7); // overridden
214+
215+
debug("Setting incompatible color mask on RGB9_E5 draw buffer")
216+
dbiExt.colorMaskiOES(0, false, false, false, true);
217+
runOps(enabled, 8); // overridden
218+
219+
debug("Setting compatible color mask on RGB9_E5 draw buffer")
220+
dbiExt.colorMaskiOES(0, false, false, false, false);
221+
runOps(enabled, 0); // overridden
222+
223+
debug("Setting compatible color mask on RGB9_E5 draw buffer")
224+
dbiExt.colorMaskiOES(0, true, true, true, true);
225+
runOps(enabled, 15); // overridden
216226
}
217227
}
218228
}

0 commit comments

Comments
 (0)