Skip to content

[WebGPU] HDR gets clamped in workers #47172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

mwyrzykowski
Copy link
Contributor

@mwyrzykowski mwyrzykowski commented Jun 25, 2025

048157a

[WebGPU] HDR gets clamped in workers
https://bugs.webkit.org/show_bug.cgi?id=294871
rdar://154137098

Reviewed by Simon Fraser.

Offscreen canvas was using BGRA8 instead of RGBA16F when
drawing HDR content to it.

* Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm:
(WebCore::GPUCanvasContextCocoa::pixelFormat const):
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::createImageBuffer const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::copyImageBuffer):
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
(WebGPU::PresentationContextIOSurface::getTextureAsNativeImage):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::createImageBuffer const):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Canonical link: https://commits.webkit.org/296709@main

b0ef2da

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ❌ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@mwyrzykowski mwyrzykowski self-assigned this Jun 25, 2025
@mwyrzykowski mwyrzykowski added the WebGPU For bugs in WebGPU label Jun 25, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 25, 2025
@mwyrzykowski mwyrzykowski removed the merging-blocked Applied to prevent a change from being merged label Jun 25, 2025
@mwyrzykowski mwyrzykowski force-pushed the eng/WebGPU-HDR-gets-clamped-in-workers branch from 3cca835 to df3b1e9 Compare June 25, 2025 19:57
@mwyrzykowski mwyrzykowski force-pushed the eng/WebGPU-HDR-gets-clamped-in-workers branch from df3b1e9 to 1e8ddf1 Compare June 25, 2025 20:00
@mwyrzykowski mwyrzykowski added safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Jun 25, 2025
@mwyrzykowski mwyrzykowski force-pushed the eng/WebGPU-HDR-gets-clamped-in-workers branch from 1e8ddf1 to b0ef2da Compare June 27, 2025 00:44
@mwyrzykowski mwyrzykowski added the merge-queue Applied to send a pull request to merge-queue label Jun 27, 2025
https://bugs.webkit.org/show_bug.cgi?id=294871
rdar://154137098

Reviewed by Simon Fraser.

Offscreen canvas was using BGRA8 instead of RGBA16F when
drawing HDR content to it.

* Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm:
(WebCore::GPUCanvasContextCocoa::pixelFormat const):
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::createImageBuffer const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::copyImageBuffer):
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
(WebGPU::PresentationContextIOSurface::getTextureAsNativeImage):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::createImageBuffer const):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Canonical link: https://commits.webkit.org/296709@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WebGPU-HDR-gets-clamped-in-workers branch from b0ef2da to 048157a Compare June 27, 2025 06:43
@webkit-commit-queue
Copy link
Collaborator

Committed 296709@main (048157a): https://commits.webkit.org/296709@main

Reviewed commits have been landed. Closing PR #47172 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 048157a into WebKit:main Jun 27, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants