The WHLSL compiler is Metal specific.
Created attachment 409164 [details] Patch
Comment on attachment 409164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409164&action=review > Source/WTF/wtf/PlatformEnableCocoa.h:564 > +#define ENABLE_WEBGPU 0 This shouldn't be unnecessary. The ENABLE() macro yields false if the token isn't defined.
Comment on attachment 409164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409164&action=review >> Source/WTF/wtf/PlatformEnableCocoa.h:564 >> +#define ENABLE_WEBGPU 0 > > This shouldn't be unnecessary. The ENABLE() macro yields false if the token isn't defined. This shouldn't be unnecessary. The ENABLE() macro yields false if the token isn't defined. > Source/WTF/wtf/PlatformEnableCocoa.h:568 > +#define ENABLE_WHLSL_COMPILER ENABLE_WEBGPU Why can't we just put this #define in the above block, and #define it to 1? I don't think we have precedence in these PlatformEnable files for defining things to be equal to other things.
s/precedence/precedent/
Comment on attachment 409164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409164&action=review >> Source/WTF/wtf/PlatformEnableCocoa.h:568 >> +#define ENABLE_WHLSL_COMPILER ENABLE_WEBGPU > > Why can't we just put this #define in the above block, and #define it to 1? I don't think we have precedence in these PlatformEnable files for defining things to be equal to other things. I wouldn’t combine the blocks. But I would write it like this: #if !defined(ENABLE_WHLSL_COMPILER) && ENABLE(WEBGPU) #define ENABLE_WHLSL_COMPILER 1 #endif
Comment on attachment 409164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409164&action=review >>> Source/WTF/wtf/PlatformEnableCocoa.h:568 >>> +#define ENABLE_WHLSL_COMPILER ENABLE_WEBGPU >> >> Why can't we just put this #define in the above block, and #define it to 1? I don't think we have precedence in these PlatformEnable files for defining things to be equal to other things. > > I wouldn’t combine the blocks. But I would write it like this: > > #if !defined(ENABLE_WHLSL_COMPILER) && ENABLE(WEBGPU) > #define ENABLE_WHLSL_COMPILER 1 > #endif Or alternatively we could always check both in the code, and have ENABLE_WHLSL_COMPILER be a no-op when ENABLE(WEBGPU) is not set.
Created attachment 409169 [details] Patch
Committed r267288: <https://trac.webkit.org/changeset/267288> All reviewed patches have been landed. Closing bug and clearing flags on attachment 409169 [details].
<rdar://problem/69180169>