[Webkit-unassigned] [Bug 222822] WebGL2: SRGB8_ALPHA8 *sometimes* does not linearize texture color
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 5 09:58:30 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=222822
--- Comment #7 from Kimmo Kinnunen <kkinnunen at apple.com> ---
Originally in this bug, the report was two distinct bugs:
Symptom 1. gl.SRGB8 and gl.SRGB8_ALPHA8 video uploads look different
Symptom 2. Symptom 1. happens only sometimes.
Since the report, WebKit has now fixed the symptom 2.
The symptom 1 comes from a bug where GPU fast path does not agree to the CPU slow path. SRGB8 is the slow path, as that's not color-renderable in WebGL.
The GPU fast path renders the source video from the YUV texture to the target texture SRGB8_ALPHA8. The destination gl.SRGB8 does not affect the rendering shader. This means that sampling the destination texture produces always the same result, regardless of the destination target.
The CPU slow path reads the source video to (a few) CPU buffers, mangles the data and does real glTexImage2D. The destination gl.SRGB8 does not affect the mangling, and as such it will have the same data in glTexImage2D for SRGB8 as for RGB8. This means that sampling the destination texture produces different result for different texture targets.
So:
The GPU fast path is correct in the sense that it always produces a texture that samples similar to as how the video looks without WebGL.
The CPU slow path might be correct if WebGL would define the behaviour this way.
Naturally WebKit should produce the same result for both SRBG8 and SRGB8_ALPHA8.
A slight problem is that WebGL doesn't specify what should happen with the video to texture upload to SRGB8 or SRGB8_ALPHA8 texture.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220805/164b5a70/attachment.htm>
More information about the webkit-unassigned
mailing list