[webkit-reviews] review granted: [Bug 195224] [Web GPU] Blitting function prototypes : [Attachment 363550] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 4 15:40:09 PST 2019

Dean Jackson <dino at apple.com> has granted Justin Fan <justin_fan at apple.com>'s
request for review:
Bug 195224: [Web GPU] Blitting function prototypes

Attachment 363550: Patch


--- Comment #7 from Dean Jackson <dino at apple.com> ---
Comment on attachment 363550
  --> https://bugs.webkit.org/attachment.cgi?id=363550

View in context: https://bugs.webkit.org/attachment.cgi?id=363550&action=review

> Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.cpp:49
> +    return GPUBufferCopyView(buffer->buffer().releaseNonNull(), *this);

I think we tend to use syntax like this now:

return GPUBufferCopyView { buffer->buffer().releaseNonNull(), *this };

> Source/WebCore/platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:120
> +void GPUCommandBuffer::copyBufferToTexture(const GPUBufferCopyView&
srcBuffer, const GPUTextureCopyView& dstTexture, const GPUExtent3D& size)

It's kind of weird that we can have a const destination just because ObjC.

> Source/WebCore/platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:127
> +    // FIXME: Add Metal validation?

I don't think this is a question.

> Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm:62
> +    if (flags.containsAny({ GPUTextureUsage::Flags::TransferSource,
GPUTextureUsage::Flags::Sampled }) && (flags &
GPUTextureUsage::Flags::Storage)) {

You should consistently use .contains everywhere if you're going OptionSet<>

> LayoutTests/webgpu/blit-commands.html:33
> +	   usage: GPUBufferUsage.TRANSFER_SRC | GPUBufferUsage.TRANSFER_DST

I think bufferA is SRC only and bufferB is both.

More information about the webkit-reviews mailing list