[webkit-changes] [WebKit/WebKit] f0e83b: [WebGPU] VideoTextures sometimes fail to load beca...
mwyrzykowski
noreply at github.com
Sat Jan 18 13:41:43 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f0e83b3447bfbd13bc44aa460f26ae3727c2dde3
https://github.com/WebKit/WebKit/commit/f0e83b3447bfbd13bc44aa460f26ae3727c2dde3
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2025-01-18 (Sat, 18 Jan 2025)
Changed paths:
M Source/WebCore/Modules/WebGPU/GPUQueue.cpp
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.cpp
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.h
M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUQueue.h
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/Queue.mm
M Source/WebGPU/WebGPU/Texture.h
M Source/WebGPU/WebGPU/Texture.mm
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h
Log Message:
-----------
[WebGPU] VideoTextures sometimes fail to load because bytesPerRow(1920) is less than bytesInLastRow(5180)
https://bugs.webkit.org/show_bug.cgi?id=286012
rdar://142987498
Reviewed by Tadeu Zagallo.
GPUQueue.copyExternalImageToTexture(...) was not correctly handling
420v and other biplanar formats.
Support this is an identical manner to WebGL via VideoFrameObjectHeap.
It is far more efficient to use GPUDevice.importExternalTexture(...) but
sites which choose to use GPUQueue.copyExternalImageToTexture(...) for any
reason should still observe correct behavior.
* Source/WebCore/Modules/WebGPU/GPUQueue.cpp:
(WebCore::getImageBytesFromVideoFrame):
(WebCore::imageBytesForSource):
(WebCore::GPUQueue::copyExternalImageToTexture):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.cpp:
(WebCore::WebGPU::QueueImpl::getNativeImage):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.h:
* Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUQueue.h:
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::errorValidatingCopyBufferToTexture const):
(WebGPU::CommandEncoder::errorValidatingCopyTextureToBuffer const):
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::errorValidatingWriteTexture const):
* Source/WebGPU/WebGPU/Texture.h:
* Source/WebGPU/WebGPU/Texture.mm:
(WebGPU::Texture::errorValidatingLinearTextureData):
(WebGPU::Texture::validateLinearTextureData): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp:
(WebKit::WebGPU::RemoteQueueProxy::RemoteQueueProxy):
(WebKit::WebGPU::RemoteQueueProxy::getNativeImage):
(WebKit::WebGPU::RemoteQueueProxy::protectedVideoFrameObjectHeapProxy const):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h:
Canonical link: https://commits.webkit.org/289122@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