Bug 236910

Summary: [WebGPU] Tracer bullet part 10: Implement setLabel() and Metal accessors
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: WebGPUAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, rmorisset, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 236879    
Attachments:
Description Flags
Patch dino: review+

Description Myles C. Maxfield 2022-02-19 21:39:28 PST
By adding a few various trivial functions in classes that need them, this patch completely finishes the implementation of CommandBuffer, QuerySet, RenderBundle, Sampler, and TextureView classes (other than their creation functions).
Comment 1 Myles C. Maxfield 2022-02-19 21:41:10 PST
Created attachment 452678 [details]
Patch
Comment 2 Dean Jackson 2022-02-21 09:35:48 PST
Comment on attachment 452678 [details]
Patch

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

> Source/WebGPU/WebGPU/RenderPassEncoder.mm:178
> +    m_renderCommandEncoder.label = [NSString stringWithCString:label encoding:NSUTF8StringEncoding];

Do you ever want to ASSERT that m_renderCommandEncoder etc exist?
Comment 3 Myles C. Maxfield 2022-02-21 13:31:08 PST
Comment on attachment 452678 [details]
Patch

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

>> Source/WebGPU/WebGPU/RenderPassEncoder.mm:178
>> +    m_renderCommandEncoder.label = [NSString stringWithCString:label encoding:NSUTF8StringEncoding];
> 
> Do you ever want to ASSERT that m_renderCommandEncoder etc exist?

Yep! It's done in the creation routines. And rather than ASSERT()ing, it instead just doesn't create the WebGPU wrapper object.
Comment 4 Myles C. Maxfield 2022-02-21 13:32:51 PST
Committed r290266 (247591@trunk): <https://commits.webkit.org/247591@trunk>
Comment 5 Radar WebKit Bug Importer 2022-02-21 13:33:31 PST
<rdar://problem/89253939>