Improve WebGPU implementation, including using Metal Objective-C protocols more simply and correctly
Created attachment 344304 [details] Patch
Patch ended up huge; I can break it down into smaller bites if needed. However, since this is all in WebGPU so not on by default I think maybe we can just test it all together.
I was led to tackle this by problems compiling the Metal code under ARC that this patch resolves.
Attachment 344304 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:45: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 16 in 100 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 344305 [details] Patch
Attachment 344305 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:45: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 16 in 100 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 344306 [details] Patch
Attachment 344306 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:45: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 16 in 100 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 344307 [details] Patch
Attachment 344307 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:45: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 16 in 106 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 344307 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344307&action=review > Source/WebCore/platform/graphics/cocoa/GPURenderCommandEncoderMetal.mm:85 > + // FIXME: Why can't we set the count to zero? Should probably say "Why do we need a special optimization for count of zero?"
That latest version of the patch passes all the tests on EWS so I hope someone can review now. Annoying that the style checker has lots of complaints.
Any takers for review?
(In reply to Darin Adler from comment #13) > Any takers for review? I'm working my way through.
Comment on attachment 344307 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344307&action=review > Source/WebCore/ChangeLog:74 > + (WebCore::WebGPUBuffer::create): Return nullptr if we fail to create a GPU buffer. > + Also use more references rather than pointers for things that are never null. This is a change in behavior (we always used to return an object). What is motivating this change? Do we have a test for this new behavior? > Source/WebCore/ChangeLog:268 > + * platform/graphics/cocoa/GPUBufferMetal.mm: Instead of being in the platform/graphics/cocoa directory, should we move this (and all the other metal files, to a platform/graphics/metal directory? > Source/WTF/wtf/Compiler.h:303 > +#if !defined(OBJC_PROTOCOL) && defined(__OBJC__) > +#define OBJC_PROTOCOL(protocolName) @protocol protocolName; using protocolName = NSObject <protocolName> > +#endif I'm not clear on what the 'using...' part is doing. Might be worth a comment. > Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:75 > RefPtr<WebGPURenderCommandEncoder> WebGPUCommandBuffer::createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor& descriptor) > { > - RefPtr<WebGPURenderCommandEncoder> commandEncoder = WebGPURenderCommandEncoder::create(this->context(), this, &descriptor); > - return commandEncoder; > + return WebGPURenderCommandEncoder::create(*context(), m_buffer, descriptor.descriptor()); > } It looks like WebGPURenderCommandEncoder::create returns a Ref<WebGPURenderCommandEncoder>, so this function could as well. > Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:80 > RefPtr<WebGPUComputeCommandEncoder> WebGPUCommandBuffer::createComputeCommandEncoder() > { > - RefPtr<WebGPUComputeCommandEncoder> commandEncoder = WebGPUComputeCommandEncoder::create(this->context(), this); > - return commandEncoder; > + return WebGPUComputeCommandEncoder::create(*context(), m_buffer); > } Ditto. > Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:52 > RefPtr<WebGPUCommandBuffer> WebGPUCommandQueue::createCommandBuffer() > { > - RefPtr<WebGPUCommandBuffer> buffer = WebGPUCommandBuffer::create(this->context(), this); > - return buffer; > + return WebGPUCommandBuffer::create(*context(), m_queue); > } WebGPUCommandBuffer::create returns a Ref<WebGPUCommandBuffer>, so this function can as well. > Source/WebCore/html/canvas/WebGPUDrawable.cpp:45 > + , m_texture { WebGPUTexture::createFromDrawableTexture(context, GPUTexture { m_drawable }) } WebGPUTexture::createFromDrawableTexture returns a Ref<WebGPUTexture>, so m_texture can be a Ref<WebGPUTexture>. > Source/WebCore/html/canvas/WebGPULibrary.cpp:58 > + auto function = WebGPUFunction::create(*context(), m_library, name); > if (!function->function()) > return nullptr; > - return function; > + return WTFMove(function); It seems like this could be done slightly more efficiently if the GPUFunction was created first, checked to see if the function was non-null, and then only if it was non-null, moved into a newly created WebGPUFunction. This would avoid the allocation of the WebGPUFunction in the case that the function doesn't exist. > Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp:47 > -RefPtr<WebGPURenderPassDepthAttachmentDescriptor> WebGPURenderPassDescriptor::depthAttachment() > +WebGPURenderPassDepthAttachmentDescriptor* WebGPURenderPassDescriptor::depthAttachment() > { > - if (!m_renderPassDescriptor) > - return nullptr; > - > - if (!m_depthAttachmentDescriptor) { > - RefPtr<GPURenderPassDepthAttachmentDescriptor> platformDepthAttachment = m_renderPassDescriptor->depthAttachment(); > - m_depthAttachmentDescriptor = WebGPURenderPassDepthAttachmentDescriptor::create(this->context(), platformDepthAttachment.get()); > - } > - return m_depthAttachmentDescriptor; > + if (!m_depthAttachment) > + m_depthAttachment = WebGPURenderPassDepthAttachmentDescriptor::create(*context(), m_descriptor.depthAttachment()); > + return m_depthAttachment.get(); > } WebGPURenderPassDepthAttachmentDescriptor::create returns a Ref<WebGPURenderPassDepthAttachmentDescriptor>, so I think this function can also return a Ref<> (or a reference). > Source/WebCore/html/canvas/WebGPURenderingContext.cpp:82 > - auto renderingContext = std::unique_ptr<WebGPURenderingContext>(new WebGPURenderingContext(canvas, device.releaseNonNull())); > + auto renderingContext = std::unique_ptr<WebGPURenderingContext>(new WebGPURenderingContext(canvas, WTFMove(device))); Can std::make_unique be used here? > Source/WebCore/html/canvas/WebGPURenderingContext.cpp:162 > RefPtr<WebGPURenderPipelineState> WebGPURenderingContext::createRenderPipelineState(WebGPURenderPipelineDescriptor& descriptor) > { > - RefPtr<WebGPURenderPipelineState> state = WebGPURenderPipelineState::create(this, &descriptor); > - return state; > + return WebGPURenderPipelineState::create(*this, descriptor.descriptor()); > } This can return a Ref<WebGPURenderPipelineState>. > Source/WebCore/html/canvas/WebGPURenderingContext.cpp:167 > RefPtr<WebGPUDepthStencilState> WebGPURenderingContext::createDepthStencilState(WebGPUDepthStencilDescriptor& descriptor) > { > - RefPtr<WebGPUDepthStencilState> state = WebGPUDepthStencilState::create(this, &descriptor); > - return state; > + return WebGPUDepthStencilState::create(*this, descriptor.descriptor()); > } This can return a Ref<WebGPURenderPipelineState> > Source/WebCore/html/canvas/WebGPURenderingContext.cpp:172 > RefPtr<WebGPUComputePipelineState> WebGPURenderingContext::createComputePipelineState(WebGPUFunction& function) > { > - RefPtr<WebGPUComputePipelineState> state = WebGPUComputePipelineState::create(this, &function); > - return state; > + return WebGPUComputePipelineState::create(*this, function.function()); > } This can return a Ref<WebGPURenderPipelineState>. > Source/WebCore/html/canvas/WebGPURenderingContext.cpp:177 > RefPtr<WebGPUCommandQueue> WebGPURenderingContext::createCommandQueue() > { > - RefPtr<WebGPUCommandQueue> queue = WebGPUCommandQueue::create(this); > - return queue; > + return WebGPUCommandQueue::create(*this); > } This can return a Ref<WebGPUCommandQueue>. > Source/WebCore/html/canvas/WebGPURenderingContext.cpp:182 > RefPtr<WebGPUDrawable> WebGPURenderingContext::nextDrawable() > { > - RefPtr<WebGPUDrawable> drawable = WebGPUDrawable::create(this); > - return drawable; > + return WebGPUDrawable::create(*this); > } This can return a Ref<WebGPUDrawable> > Source/WebCore/html/canvas/WebGPURenderingContext.cpp:192 > RefPtr<WebGPUTexture> WebGPURenderingContext::createTexture(WebGPUTextureDescriptor& descriptor) > { > - RefPtr<WebGPUTexture> texture = WebGPUTexture::create(this, &descriptor); > - return texture; > + return WebGPUTexture::create(*this, descriptor.descriptor()); > } This can return a Ref<WebGPUTexture>. > Source/WebCore/platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm:59 > + if (!newFunction.metal()) > + return; > + [m_metal setVertexFunction:newFunction.metal()]; This is changing behavior when newFunction.metal() is nil, it used to call setVertexFunction with nil. Why is that the right change? > Source/WebCore/platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm:66 > + if (!newFunction.metal()) > + return; > + [m_metal setFragmentFunction:newFunction.metal()]; Ditto. > Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:40 > +GPURenderPipelineState::GPURenderPipelineState(const GPUDevice& device, const GPURenderPipelineDescriptor& descriptor) > + : m_metal { adoptNS([device.metal() newRenderPipelineStateWithDescriptor:descriptor.metal() error:nil]) } Should we be checking this error value? > Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp:55 > +DOMPromiseProxy<IDLVoid>& GPUCommandBuffer::completed() > { > + if (!m_addedCompletedHandler) { > + addCompletedHandler(); > + m_addedCompletedHandler = true; > + } > return m_completedPromise; > } This feels like a layering violation. Classes in the platform layer should not be using DOMPromiseProxy. I believe what we have done traditionally is just use stored callback functions.
Comment on attachment 344307 [details] Patch Thanks Darin!
Comment on attachment 344307 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344307&action=review >> Source/WebCore/ChangeLog:74 >> + Also use more references rather than pointers for things that are never null. > > This is a change in behavior (we always used to return an object). What is motivating this change? Do we have a test for this new behavior? The only call site is WebGPURenderingContext::createBuffer, a web-exposed function that returns a WebGPUBuffer? and I presumed the reason for the nullable return value was to handle failure. The old behavior was to return a WebGPUBuffer with 0 length and null for contents, which does not seem as good to me, but I guess the real issue is what we want to specify. I did not add a test, nor is there an existing test that covers this; should add one. The failures are ones in GPUBuffer::GPUBuffer; I’m not sure how to manufacture one for the test. >> Source/WebCore/ChangeLog:268 >> + * platform/graphics/cocoa/GPUBufferMetal.mm: > > Instead of being in the platform/graphics/cocoa directory, should we move this (and all the other metal files, to a platform/graphics/metal directory? Yes, I’d like that slightly better. >> Source/WTF/wtf/Compiler.h:303 >> +#endif > > I'm not clear on what the 'using...' part is doing. Might be worth a comment. What the "using" part does is define a type with the same name as the protocol. That way we can write MTLBuffer * or RetainPtr<MTLBuffer> instead of NSObject<MTLBuffer> * or id<MTLBuffer>. This lets us use syntax that works in both C++ and Objective-C++ for types in headers. I’d be happy to write a comment about that. >> Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:75 >> } > > It looks like WebGPURenderCommandEncoder::create returns a Ref<WebGPURenderCommandEncoder>, so this function could as well. Which is good since the IDL file also doesn’t indicate that the return value is nullable. Done. >> Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:80 >> } > > Ditto. Done. >> Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:52 >> } > > WebGPUCommandBuffer::create returns a Ref<WebGPUCommandBuffer>, so this function can as well. I will do this, but I also have to change the IDL to return a non-nullable. >> Source/WebCore/html/canvas/WebGPULibrary.cpp:58 >> + return WTFMove(function); > > It seems like this could be done slightly more efficiently if the GPUFunction was created first, checked to see if the function was non-null, and then only if it was non-null, moved into a newly created WebGPUFunction. This would avoid the allocation of the WebGPUFunction in the case that the function doesn't exist. It’s more efficient for the failure case, and possibly slightly less efficient for the success case, since we have to move the GPUFunction. But, sure, I will do it. >> Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp:47 >> } > > WebGPURenderPassDepthAttachmentDescriptor::create returns a Ref<WebGPURenderPassDepthAttachmentDescriptor>, so I think this function can also return a Ref<> (or a reference). Done. >> Source/WebCore/html/canvas/WebGPURenderingContext.cpp:82 >> + auto renderingContext = std::unique_ptr<WebGPURenderingContext>(new WebGPURenderingContext(canvas, WTFMove(device))); > > Can std::make_unique be used here? It could if we make the WebGPURenderingContext constructor public or make make_unique a friend. But in either case this has the bad effect of allowing others to make one of these without calling the create function. I think I will leave it alone for now. >> Source/WebCore/html/canvas/WebGPURenderingContext.cpp:162 >> } > > This can return a Ref<WebGPURenderPipelineState>. Requires change to the IDL file. Done. >> Source/WebCore/html/canvas/WebGPURenderingContext.cpp:167 >> } > > This can return a Ref<WebGPURenderPipelineState> Requires change to the IDL file. Done. >> Source/WebCore/html/canvas/WebGPURenderingContext.cpp:172 >> } > > This can return a Ref<WebGPURenderPipelineState>. Requires change to the IDL file. Done. >> Source/WebCore/html/canvas/WebGPURenderingContext.cpp:177 >> } > > This can return a Ref<WebGPUCommandQueue>. Requires change to the IDL file. Done. >> Source/WebCore/html/canvas/WebGPURenderingContext.cpp:182 >> } > > This can return a Ref<WebGPUDrawable> Requires change to the IDL file. Done. >> Source/WebCore/html/canvas/WebGPURenderingContext.cpp:192 >> } > > This can return a Ref<WebGPUTexture>. Requires change to the IDL file. Done. >> Source/WebCore/platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm:59 >> + [m_metal setVertexFunction:newFunction.metal()]; > > This is changing behavior when newFunction.metal() is nil, it used to call setVertexFunction with nil. Why is that the right change? Oops, it’s not. Changing back. >> Source/WebCore/platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm:66 >> + [m_metal setFragmentFunction:newFunction.metal()]; > > Ditto. Changing back. >> Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:40 >> + : m_metal { adoptNS([device.metal() newRenderPipelineStateWithDescriptor:descriptor.metal() error:nil]) } > > Should we be checking this error value? Well, we are checking it; it returns nil when it fails. I suppose your question amounts to: Should we use an NSError out argument so we can report error details? But I don’t know how we we would do that. Log in the console? >> Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp:55 >> } > > This feels like a layering violation. Classes in the platform layer should not be using DOMPromiseProxy. I believe what we have done traditionally is just use stored callback functions. As a bonus this will eliminate the need for GPUCommandBuffer to be a reference counted object. I’ll give it a try.
Created attachment 345020 [details] Patch
Attachment 345020 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:50: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.h:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:45: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 18 in 107 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 345021 [details] Patch
Latest patch, much larger, includes the move of all the Metal files from the "cocoa" directory to the "metal" directory.
Comment on attachment 344307 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344307&action=review >>> Source/WebCore/ChangeLog:74 >>> + Also use more references rather than pointers for things that are never null. >> >> This is a change in behavior (we always used to return an object). What is motivating this change? Do we have a test for this new behavior? > > The only call site is WebGPURenderingContext::createBuffer, a web-exposed function that returns a WebGPUBuffer? and I presumed the reason for the nullable return value was to handle failure. The old behavior was to return a WebGPUBuffer with 0 length and null for contents, which does not seem as good to me, but I guess the real issue is what we want to specify. > > I did not add a test, nor is there an existing test that covers this; should add one. The failures are ones in GPUBuffer::GPUBuffer; I’m not sure how to manufacture one for the test. My latest patch deals with all the comments except for this one. Sam, I could change the behavior back, land this without a test, or try to figure out how to write a test. I’m thinking “change the behavior back” maybe?
Attachment 345021 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:50: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.h:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:45: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUCommandBufferMetal.mm:42: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:38: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDrawableMetal.mm:40: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:47: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] Total errors found: 22 in 107 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 345025 [details] Patch
Attachment 345025 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:50: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.h:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:45: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUCommandBufferMetal.mm:42: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:38: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDrawableMetal.mm:40: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:47: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] Total errors found: 22 in 109 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 345025 [details] Patch Attachment 345025 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8534072 New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
Created attachment 345029 [details] Archive of layout-test-results from ews201 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews201 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
(In reply to Darin Adler from comment #22) > Comment on attachment 344307 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=344307&action=review > > >>> Source/WebCore/ChangeLog:74 > >>> + Also use more references rather than pointers for things that are never null. > >> > >> This is a change in behavior (we always used to return an object). What is motivating this change? Do we have a test for this new behavior? > > > > The only call site is WebGPURenderingContext::createBuffer, a web-exposed function that returns a WebGPUBuffer? and I presumed the reason for the nullable return value was to handle failure. The old behavior was to return a WebGPUBuffer with 0 length and null for contents, which does not seem as good to me, but I guess the real issue is what we want to specify. > > > > I did not add a test, nor is there an existing test that covers this; should add one. The failures are ones in GPUBuffer::GPUBuffer; I’m not sure how to manufacture one for the test. > > My latest patch deals with all the comments except for this one. > > Sam, I could change the behavior back, land this without a test, or try to > figure out how to write a test. I’m thinking “change the behavior back” > maybe? I think "change the behavior back" sounds right. Given how big this is, separating out behavior change into a separate commit seems like a good idea.
Comment on attachment 344307 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344307&action=review >>>>> Source/WebCore/ChangeLog:74 >>>>> + Also use more references rather than pointers for things that are never null. >>>> >>>> This is a change in behavior (we always used to return an object). What is motivating this change? Do we have a test for this new behavior? >>> >>> The only call site is WebGPURenderingContext::createBuffer, a web-exposed function that returns a WebGPUBuffer? and I presumed the reason for the nullable return value was to handle failure. The old behavior was to return a WebGPUBuffer with 0 length and null for contents, which does not seem as good to me, but I guess the real issue is what we want to specify. >>> >>> I did not add a test, nor is there an existing test that covers this; should add one. The failures are ones in GPUBuffer::GPUBuffer; I’m not sure how to manufacture one for the test. >> >> My latest patch deals with all the comments except for this one. >> >> Sam, I could change the behavior back, land this without a test, or try to figure out how to write a test. I’m thinking “change the behavior back” maybe? > > I think "change the behavior back" sounds right. Given how big this is, separating out behavior change into a separate commit seems like a good idea. Done. Will land once EWS and I are convinced the patch is ready.
Created attachment 345745 [details] Patch
Attachment 345745 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:38: *SoftLink.h header should be included after all other headers. [build/include_order] [4] ERROR: Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:41: *SoftLink.h header should be included after all other headers. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:50: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.h:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUCommandBufferMetal.mm:42: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:38: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUFunctionMetal.mm:38: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDrawableMetal.mm:40: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:47: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] Total errors found: 24 in 110 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 345817 [details] Patch
Attachment 345817 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:50: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.h:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUCommandBufferMetal.mm:42: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:38: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUFunctionMetal.mm:39: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDrawableMetal.mm:40: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:47: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] Total errors found: 22 in 110 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 345817 [details] Patch Attachment 345817 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/8658119 New failing tests: fast/canvas/webgpu/webgpu-dispatch.html
Created attachment 345823 [details] Archive of layout-test-results from ews101 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 345824 [details] Patch
Comment on attachment 345817 [details] Patch Attachment 345817 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/8658144 New failing tests: fast/canvas/webgpu/webgpu-dispatch.html
Created attachment 345825 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Attachment 345824 [details] did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUTexture.cpp:47: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:50: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.h:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUBuffer.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUCommandBufferMetal.mm:42: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:49: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:37: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUTextureDescriptorMetal.mm:38: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUFunctionMetal.mm:39: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUFunction.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDrawableMetal.mm:40: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUComputeCommandEncoderMetal.mm:47: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp:40: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPUDepthStencilStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] ERROR: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp:53: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/platform/graphics/metal/GPURenderPipelineStateMetal.mm:40: Missing spaces around : [whitespace/init] [4] Total errors found: 22 in 110 files If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r234258: <https://trac.webkit.org/changeset/234258>
<rdar://problem/42625316>