[webkit-changes] [WebKit/WebKit] aadb70: [WebGPU] webgpu:api, operation, resource_init, textur...

mwyrzykowski noreply at github.com
Fri Dec 1 11:35:19 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aadb70808c6df2024e980f0053bc3d524fd16488
      https://github.com/WebKit/WebKit/commit/aadb70808c6df2024e980f0053bc3d524fd16488
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-12-01 (Fri, 01 Dec 2023)

  Changed paths:
    M LayoutTests/http/tests/webgpu/webgpu/api/operation/command_buffer/image_copy-expected.txt
    M LayoutTests/http/tests/webgpu/webgpu/api/operation/resource_init/texture_zero-expected.txt
    M Source/WebGPU/WebGPU/CommandEncoder.h
    M Source/WebGPU/WebGPU/CommandEncoder.mm
    M Source/WebGPU/WebGPU/PresentationContextCoreAnimation.mm
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.mm
    M Source/WebGPU/WebGPU/Queue.h
    M Source/WebGPU/WebGPU/Queue.mm
    M Source/WebGPU/WebGPU/RenderPassEncoder.h
    M Source/WebGPU/WebGPU/RenderPassEncoder.mm
    M Source/WebGPU/WebGPU/RenderPipeline.mm
    M Source/WebGPU/WebGPU/Texture.h
    M Source/WebGPU/WebGPU/Texture.mm
    M Source/WebGPU/WebGPU/TextureView.h
    M Source/WebGPU/WebGPU/TextureView.mm

  Log Message:
  -----------
  [WebGPU] webgpu:api,operation,resource_init,texture_zero:* does not pass
https://bugs.webkit.org/show_bug.cgi?id=265430
<radar://118866231>

Reviewed by Tadeu Zagallo.

Textures are not cleared by default and we don't want to incur
the cost of clearing them on creation, so track if they are loaded
or copied prior to being cleared and clear if needed.

Also resolve ambiguitiy that 'discard' on a render target should
clear the render target, which does not seem obvious, but per
https://github.com/gpuweb/gpuweb/issues/4398 is intentional.

* Source/WebGPU/WebGPU/CommandEncoder.h:
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(-[TextureAndResolve initWithTexture:resolveTexture:]):
(WebGPU::createSimplePso):
(WebGPU::CommandEncoder::runClearEncoder):
(WebGPU::CommandEncoder::beginRenderPass):
(WebGPU::CommandEncoder::copyBufferToTexture):
(WebGPU::CommandEncoder::clearTexture):
(WebGPU::CommandEncoder::copyTextureToBuffer):
(WebGPU::CommandEncoder::copyTextureToTexture):
* Source/WebGPU/WebGPU/PresentationContextCoreAnimation.mm:
(WebGPU::PresentationContextCoreAnimation::Configuration::generateCurrentFrameState):
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
(WebGPU::PresentationContextIOSurface::configure):
* Source/WebGPU/WebGPU/Queue.h:
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::clearTexture):
(WebGPU::Queue::writeTexture):
* Source/WebGPU/WebGPU/RenderPassEncoder.h:
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::RenderPassEncoder):
(WebGPU::RenderPassEncoder::executePreDrawCommands):
(WebGPU::RenderPassEncoder::endPass):
(WebGPU::RenderPassEncoder::executeBundles):
(WebGPU::RenderPassEncoder::setScissorRect):
* Source/WebGPU/WebGPU/Texture.h:
* Source/WebGPU/WebGPU/Texture.mm:
(WebGPU::Texture::createView):
(WebGPU::Texture::previouslyCleared const):
(WebGPU::Texture::setPreviouslyCleared):
* Source/WebGPU/WebGPU/TextureView.h:
(WebGPU::TextureView::create):
(WebGPU::TextureView::createInvalid):
* Source/WebGPU/WebGPU/TextureView.mm:
(WebGPU::TextureView::TextureView):
(WebGPU::m_parentTexture):
(WebGPU::TextureView::previouslyCleared const):
(WebGPU::TextureView::setPreviouslyCleared):
(WebGPU::TextureView::width const):
(WebGPU::TextureView::height const):
(WebGPU::m_device): Deleted.

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




More information about the webkit-changes mailing list