WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
216713
[WebGPU] Add ENABLE(WHLSL_COMPILER) guard
https://bugs.webkit.org/show_bug.cgi?id=216713
Summary
[WebGPU] Add ENABLE(WHLSL_COMPILER) guard
Don Olmstead
Reported
2020-09-18 12:18:53 PDT
The WHLSL compiler is Metal specific.
Attachments
Patch
(120.68 KB, patch)
2020-09-18 12:36 PDT
,
Don Olmstead
mmaxfield
: review+
Details
Formatted Diff
Diff
Patch
(120.56 KB, patch)
2020-09-18 13:50 PDT
,
Don Olmstead
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Don Olmstead
Comment 1
2020-09-18 12:36:42 PDT
Created
attachment 409164
[details]
Patch
Myles C. Maxfield
Comment 2
2020-09-18 13:27:02 PDT
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.
Myles C. Maxfield
Comment 3
2020-09-18 13:28:01 PDT
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.
Myles C. Maxfield
Comment 4
2020-09-18 13:28:59 PDT
s/precedence/precedent/
Darin Adler
Comment 5
2020-09-18 13:46:02 PDT
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
Darin Adler
Comment 6
2020-09-18 13:46:52 PDT
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.
Don Olmstead
Comment 7
2020-09-18 13:50:48 PDT
Created
attachment 409169
[details]
Patch
EWS
Comment 8
2020-09-18 15:54:33 PDT
Committed
r267288
: <
https://trac.webkit.org/changeset/267288
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 409169
[details]
.
Radar WebKit Bug Importer
Comment 9
2020-09-18 15:55:17 PDT
<
rdar://problem/69180169
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug