Closed Bug 1081286 Opened 5 years ago Closed 5 years ago
GL2: account for the fact that SRGB formats break the 1:1 mapping between sized formats and (unsized format, type) pairs
This is a big difference between WebGL 1 + EXT_sRGB, and WebGL2. The unsized format for SRGB formats is standard RGB/RGBA in WebGL2, whereas WebGL1 + EXT_sRGB had custom SRGB and SRGB_ALPHA constants for that. I see that mostly as a quirk of the image-specification API and would rather not break the 1:1 nature of the table we use internally. Rather, it's an exception to ordinary image-specification validation rules. This unearthed an issue with ValidateTexImage: it wasn't clear whether its internalFormat parameter was sized or unsized. That depended on the 'func' parameter. With this patch, it's now unambiguously sized, and this function internally queries the unsized format value when it needs to.
Attachment #8503369 - Flags: review?(jgilbert)
Fixed the WebGL conformance test for this. The patch here is what it takes to pass the fixed conformance test. https://github.com/KhronosGroup/WebGL/pull/745
Attachment #8503369 - Flags: review?(jgilbert) → review+
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.