WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
197032
[Web GPU] Implement API default values
https://bugs.webkit.org/show_bug.cgi?id=197032
Summary
[Web GPU] Implement API default values
Justin Fan
Reported
2019-04-17 12:58:14 PDT
[Web GPU] Implement API default values
Attachments
Patch
(51.50 KB, patch)
2019-04-17 13:04 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch for landing
(46.72 KB, patch)
2019-04-18 14:54 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch for landing
(46.72 KB, patch)
2019-04-18 15:05 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Justin Fan
Comment 1
2019-04-17 13:04:55 PDT
Created
attachment 367668
[details]
Patch
Myles C. Maxfield
Comment 2
2019-04-18 13:32:07 PDT
Comment on
attachment 367668
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=367668&action=review
> Source/WebCore/ChangeLog:8 > + Add default values and 'required' qualifiers recently merged to the WebGPU API.
It's pretty frightening that this patch doesn't update almost any .cpp or .mm files, which means we were happily accepting garbage values before. I would have hoped that before this patch, all the C++ code that received these values would have done more default value creation or exception/error throwing, and this patch could have deleted all that C++ code in favor of using the IDL to represent the same checks.
> Source/WebCore/Modules/webgpu/WebGPUBufferBinding.h:37 > + uint64_t offset = 0;
Shouldn't this be done in the IDL?
> Source/WebCore/Modules/webgpu/WebGPURenderPipelineDescriptor.h:41 > + Optional<WebGPUPipelineStageDescriptor> fragmentStage;
👍
> Source/WebCore/platform/graphics/gpu/GPUBlendDescriptor.h:59 > + GPUBlendFactor srcFactor { GPUBlendFactor::One }; > + GPUBlendFactor dstFactor { GPUBlendFactor::Zero }; > + GPUBlendOperation operation { GPUBlendOperation::Add };
Doesn't the IDL take care of this for you? And ditto below.
> LayoutTests/ChangeLog:24 > + * webgpu/bind-groups.html: > + * webgpu/blend-triangle-strip.html: > + * webgpu/blit-commands.html: > + * webgpu/buffer-command-buffer-races.html: > + * webgpu/buffer-resource-triangles.html: > + * webgpu/color-write-mask-triangle-strip.html: > + * webgpu/compute-squares.html: > + * webgpu/depth-enabled-triangle-strip.html: > + * webgpu/draw-indexed-triangles.html: > + * webgpu/js/webgpu-functions.js: > + (createBasicDepthTexture): > + * webgpu/texture-triangle-strip.html: > + * webgpu/textures-textureviews.html: > + * webgpu/vertex-buffer-triangle-strip.html: > + * webgpu/whlsl.html:
Just deleting code from existing tests isn't very exhaustive. There should probably be a single new file that has a bunch of tests in it, where each test specifies every value except one, and then draws something, and we determine from the rendered content (or from some other mechanism) whether the default value was specified. If we made such a test we should consider contributing it to the WG. The WG is going to try to make a comprehensive test suite.
Justin Fan
Comment 3
2019-04-18 14:54:27 PDT
Created
attachment 367761
[details]
Patch for landing
WebKit Commit Bot
Comment 4
2019-04-18 14:56:09 PDT
Comment on
attachment 367761
[details]
Patch for landing Rejecting
attachment 367761
[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', 'validate-changelog', '--check-oops', '--non-interactive', 367761, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output:
https://webkit-queues.webkit.org/results/11919784
Justin Fan
Comment 5
2019-04-18 15:05:51 PDT
Created
attachment 367763
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2019-04-18 15:42:43 PDT
Comment on
attachment 367763
[details]
Patch for landing Clearing flags on attachment: 367763 Committed
r244442
: <
https://trac.webkit.org/changeset/244442
>
WebKit Commit Bot
Comment 7
2019-04-18 15:42:44 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2019-04-18 15:43:22 PDT
<
rdar://problem/50031486
>
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