WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
189121
[WHLSL] Not all functions should be able to run in all shader stages
https://bugs.webkit.org/show_bug.cgi?id=189121
Summary
[WHLSL] Not all functions should be able to run in all shader stages
Myles C. Maxfield
Reported
2018-08-29 16:34:17 PDT
Derivative functions can only run in fragment shaders. There are probably others like this. Same for built-in variables.
Attachments
Patch
(18.81 KB, patch)
2018-09-22 02:59 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(21.27 KB, patch)
2018-09-22 14:00 PDT
,
Myles C. Maxfield
fpizlo
: review+
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2018-08-29 16:38:20 PDT
Barriers can only be used in compute shaders
Thomas Denney
Comment 2
2018-08-29 17:18:57 PDT
When these functions are introduced in the standard library it would be nice if we could add the restriction there, e.g. native fragment float ddx(float) And then enforce that native functions with the fragment annotation can only be called from inside fragment shaders. I’d prefer to have a syntactic restriction like this than something that the interpreter/spec has to worry about.
Radar WebKit Bug Importer
Comment 3
2018-09-12 18:51:06 PDT
<
rdar://problem/44403005
>
Myles C. Maxfield
Comment 4
2018-09-22 01:59:22 PDT
The built-in variables are handled in
https://bugs.webkit.org/show_bug.cgi?id=189134
Myles C. Maxfield
Comment 5
2018-09-22 02:59:08 PDT
Created
attachment 350512
[details]
Patch
Myles C. Maxfield
Comment 6
2018-09-22 04:24:55 PDT
I'm not sure that additions to the grammar are a good idea. If we add new keywords here, it seems we should also be doing it in
https://bugs.webkit.org/show_bug.cgi?id=189122
, but I don't think a proliferation of these keywords are a good idea. It seems like the compiler could "just know" which functions have which properties.
Myles C. Maxfield
Comment 7
2018-09-22 14:00:11 PDT
Created
attachment 350533
[details]
Patch
WebKit Commit Bot
Comment 8
2018-09-24 17:29:22 PDT
Comment on
attachment 350533
[details]
Patch Rejecting
attachment 350533
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 350533, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Logging in as
commit-queue@webkit.org
... Fetching:
https://bugs.webkit.org/attachment.cgi?id=350533&action=edit
Fetching:
https://bugs.webkit.org/show_bug.cgi?id=189121
&ctype=xml&excludefield=attachmentdata Processing 1 patch from 1 bug. Processing patch 350533 from
bug 189121
. Fetching:
https://bugs.webkit.org/attachment.cgi?id=350533
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Filip Pizlo']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Parsed 15 diffs from patch file(s). patching file Tools/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Tools/WebGPUShadingLanguageRI/All.js patching file Tools/WebGPUShadingLanguageRI/CheckNativeFuncStages.js patching file Tools/WebGPUShadingLanguageRI/Intrinsics.js Hunk #1 succeeded at 715 (offset 4 lines). Hunk #2 succeeded at 822 (offset 4 lines). patching file Tools/WebGPUShadingLanguageRI/LateChecker.js Hunk #1 succeeded at 72 with fuzz 2 (offset 2 lines). patching file Tools/WebGPUShadingLanguageRI/NativeFunc.js patching file Tools/WebGPUShadingLanguageRI/Parse.js Hunk #1 FAILED at 1171. Hunk #2 succeeded at 1290 (offset 53 lines). Hunk #3 succeeded at 1300 (offset 55 lines). Hunk #4 succeeded at 1320 (offset 55 lines). 1 out of 4 hunks FAILED -- saving rejects to file Tools/WebGPUShadingLanguageRI/Parse.js.rej patching file Tools/WebGPUShadingLanguageRI/Prepare.js patching file Tools/WebGPUShadingLanguageRI/SPIRV.html patching file Tools/WebGPUShadingLanguageRI/StandardLibrary.js Hunk #4 succeeded at 1794 (offset 9 lines). Hunk #5 FAILED at 1905. Hunk #6 FAILED at 1915. 2 out of 6 hunks FAILED -- saving rejects to file Tools/WebGPUShadingLanguageRI/StandardLibrary.js.rej patching file Tools/WebGPUShadingLanguageRI/StatementCloner.js Hunk #1 succeeded at 46 (offset 3 lines). patching file Tools/WebGPUShadingLanguageRI/Test.html patching file Tools/WebGPUShadingLanguageRI/Test.js patching file Tools/WebGPUShadingLanguageRI/WSyntaxError.js patching file Tools/WebGPUShadingLanguageRI/index.html Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Filip Pizlo']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output:
https://webkit-queues.webkit.org/results/9338063
Myles C. Maxfield
Comment 9
2018-09-24 23:36:18 PDT
Committed
r236455
: <
https://trac.webkit.org/changeset/236455
>
Myles C. Maxfield
Comment 10
2018-09-25 12:35:10 PDT
Committed
r236470
: <
https://trac.webkit.org/changeset/236470
>
Myles C. Maxfield
Comment 11
2018-10-13 14:51:37 PDT
Migrated to
https://github.com/gpuweb/WHLSL/issues/59
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