Bug 217978 - [WebGPU] Increase portability of GPUBindGroup
Summary: [WebGPU] Increase portability of GPUBindGroup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-20 11:48 PDT by Don Olmstead
Modified: 2020-10-20 15:21 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.54 KB, patch)
2020-10-20 12:13 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2020-10-20 11:48:19 PDT
Remove more USE(METAL)
Comment 1 Don Olmstead 2020-10-20 12:13:37 PDT
Created attachment 411897 [details]
Patch
Comment 2 Myles C. Maxfield 2020-10-20 12:28:43 PDT
Comment on attachment 411897 [details]
Patch

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

> Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm:-167
> -#endif // USE(METAL)

This doesn't seem right. The file name ends in Metal and it's in a Cocoa folder. Presumably, if code needs to be shared, it should be moved to a more central place.
Comment 3 Don Olmstead 2020-10-20 12:40:28 PDT
Comment on attachment 411897 [details]
Patch

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

>> Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm:-167
>> -#endif // USE(METAL)
> 
> This doesn't seem right. The file name ends in Metal and it's in a Cocoa folder. Presumably, if code needs to be shared, it should be moved to a more central place.

This is just moving the #endif to correspond to where it is in corresponding header. Those methods used to correspond to a USE(METAL) guard but now don't.

I agree with you that the gpu/cocoa directory should be gpu/metal and any instances of USE(METAL) or PLATFORM(COCOA) should be removed from files contained there. I opened https://bugs.webkit.org/show_bug.cgi?id=217981 for that work.
Comment 4 Myles C. Maxfield 2020-10-20 14:11:23 PDT
(In reply to Don Olmstead from comment #3)
> Comment on attachment 411897 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=411897&action=review
> 
> >> Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm:-167
> >> -#endif // USE(METAL)
> > 
> > This doesn't seem right. The file name ends in Metal and it's in a Cocoa folder. Presumably, if code needs to be shared, it should be moved to a more central place.
> 
> This is just moving the #endif to correspond to where it is in corresponding
> header. Those methods used to correspond to a USE(METAL) guard but now don't.
> 
> I agree with you that the gpu/cocoa directory should be gpu/metal and any
> instances of USE(METAL) or PLATFORM(COCOA) should be removed from files
> contained there. I opened https://bugs.webkit.org/show_bug.cgi?id=217981 for
> that work.

I followed up with Don offline. The movement of the #endif wasn't to make that port build; it was just to match what was in the .h file for symmetry.
Comment 5 EWS 2020-10-20 15:20:56 PDT
Committed r268766: <https://trac.webkit.org/changeset/268766>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411897 [details].
Comment 6 Radar WebKit Bug Importer 2020-10-20 15:21:33 PDT
<rdar://problem/70504009>