[webkit-changes] [WebKit/WebKit] a42510: [WebXR] Override compositor textures sRGB transfer...
Dan Glastonbury
noreply at github.com
Thu May 2 06:12:59 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a4251036b8d09d57de47d9f37b0dcd3a06fa97dc
https://github.com/WebKit/WebKit/commit/a4251036b8d09d57de47d9f37b0dcd3a06fa97dc
Author: Dan Glastonbury <djg at apple.com>
Date: 2024-05-02 (Thu, 02 May 2024)
Changed paths:
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ImageMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_utils.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm
M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp
Log Message:
-----------
[WebXR] Override compositor textures sRGB transfer function
https://bugs.webkit.org/show_bug.cgi?id=273603
rdar://127400068
Reviewed by Mike Wyrzykowski.
Immersive VR sessions in WebXR look washed out compared to the inline version.
CompositorServices provides textures with pixel format
MTLPixelFormatBGRA8Unorm_sRGB. Since glBlitFramebuffer is implemented as a draw
in ANGLE, when blitting shared to layered layout an unwanted gamma conversion is
being applied which is resulting in "lighter" than expected values.
To fix this, override the format with GL_BGRA8_EXT (aka
MTLPixelFormatBGRA8Unorm) when attaching the compositor images as external
images to avoid this conversion.
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ImageMtl.mm:
(rx::TextureImageSiblingMtl::ValidateClientBuffer):
(rx::TextureImageSiblingMtl::initImpl):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_utils.h:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_utils.mm:
(rx::mtl::Format::isViewCompatible const):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm:
(rx::mtl::Texture::createSliceMipViewWithCompatibleFormat):
(rx::mtl::Texture::createSliceMipView):
* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
Canonical link: https://commits.webkit.org/278252@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list