WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
Bug 167952
WebGPU prototype
https://bugs.webkit.org/show_bug.cgi?id=167952
Summary
WebGPU prototype
Dean Jackson
Reported
2017-02-07 13:09:09 PST
A prototype for a new GPU API.
Attachments
Prototype
(687.56 KB, patch)
2017-02-07 13:14 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Frontend patch that should build when WEBGPU not defined
(215.29 KB, patch)
2017-03-10 17:09 PST
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Frontend patch that should build when WEBGPU not defined
(254.13 KB, patch)
2017-03-10 18:03 PST
,
Jon Lee
no flags
Details
Formatted Diff
Diff
1. Frontend patch that should build when WEBGPU not defined
(268.42 KB, patch)
2017-03-10 20:38 PST
,
Jon Lee
no flags
Details
Formatted Diff
Diff
2. Adjust Front-End classes to build with platform stubs
(51.35 KB, patch)
2017-03-10 20:39 PST
,
Jon Lee
no flags
Details
Formatted Diff
Diff
2. Adjust Front-End classes to build with platform stubs
(59.06 KB, patch)
2017-03-10 22:35 PST
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Complete patch (1+2)
(277.06 KB, patch)
2017-03-10 22:38 PST
,
Jon Lee
dino
: review+
Details
Formatted Diff
Diff
Patch for EWS
(270.19 KB, patch)
2017-03-11 15:04 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Dean Jackson
Comment 1
2017-02-07 13:14:28 PST
Created
attachment 300839
[details]
Prototype Here is a WIP patch. It definitely can't be landed in the current form. - it doesn't yet match the API proposal - it doesn't separate WebGPU from the Metal API. i.e. there should be a GPU* interface with GPU*Metal implementations - it does no validation - it doesn't have a compile time or runtime guard It's here just to experiment.
rtfss1
Comment 2
2017-02-09 04:25:11 PST
Hi, interesting Webkit that current patch uses metal shaders. For me this might be even a good shader language to use in WebGPU, but then will be time for requesting Apple to open source Metal shader compiler stack like Microsoft has done recently with current HLSL shader compiler that translates to his new intermediate format DXIL.. the new Microsoft compiler uses LLVM/Clang stack and seems Apple Metal shader compiler too.. So briefly here (may be not the current best place to ask), with Khronos LLVM IR<->SPIR-V translator and DXIL open source only modern shader language compiler not open source is Metal and would make sense to open source it for WebGPU implementations on other OSes and even make easier porting modern macos/IOS games using Metal to other OSes.. Makes sense? thanks..
Jon Lee
Comment 3
2017-02-14 16:08:26 PST
(In reply to
comment #2
)
> So briefly here (may be not the current best place to ask)
@rtfss1, the best place to pose technical questions is in the WebGPU GitHub repo:
https://github.com/gpuweb/gpuweb
Jon Lee
Comment 4
2017-03-10 17:09:57 PST
Created
attachment 304103
[details]
Frontend patch that should build when WEBGPU not defined No review yet.
WebKit Commit Bot
Comment 5
2017-03-10 17:12:31 PST
Attachment 304103
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPURenderingContext.cpp:39: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderingContext.cpp:43: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderingContext.cpp:90: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderingContext.cpp:122: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:51: The parameter name "buffer" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:51: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:52: The parameter name "buffer" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:52: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:53: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/WebKit/mac/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/WebKit2/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPUTextureDescriptor.cpp:61: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp:32: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp:34: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp:46: Wrong number of spaces before statement. (expected: 4) [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp:76: One line control clauses should not use braces. [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUCommandBuffer.h:51: The parameter name "descriptor" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebCore/html/canvas/WebGPUObject.h:48: The parameter name "context" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp:32: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp:35: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp:65: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp:112: One line control clauses should not use braces. [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp:61: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:31: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:36: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:38: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:74: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:82: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:90: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp:32: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 35 in 72 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jon Lee
Comment 6
2017-03-10 18:03:09 PST
Created
attachment 304108
[details]
Frontend patch that should build when WEBGPU not defined
WebKit Commit Bot
Comment 7
2017-03-10 18:05:11 PST
Attachment 304108
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPURenderingContext.cpp:90: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:51: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:52: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:53: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/WebKit/mac/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Source/WebKit2/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0: Any changes made to FeatureDefines should be made to all of them (changed file does not match Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible. [featuredefines/equality] [5] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:74: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:82: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:90: Omit int when using unsigned [runtime/unsigned] [1] Total errors found: 12 in 72 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jon Lee
Comment 8
2017-03-10 20:38:14 PST
Created
attachment 304121
[details]
1. Frontend patch that should build when WEBGPU not defined
Jon Lee
Comment 9
2017-03-10 20:39:01 PST
Created
attachment 304122
[details]
2. Adjust Front-End classes to build with platform stubs
Jon Lee
Comment 10
2017-03-10 22:35:47 PST
Created
attachment 304136
[details]
2. Adjust Front-End classes to build with platform stubs
Jon Lee
Comment 11
2017-03-10 22:38:47 PST
Created
attachment 304137
[details]
Complete patch (1+2)
WebKit Commit Bot
Comment 12
2017-03-10 22:42:21 PST
Attachment 304137
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:45: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:46: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:47: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:65: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:66: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h:67: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/ChangeLog:36: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:37: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:38: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:39: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:40: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:41: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:42: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:43: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:44: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:45: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:46: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:47: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:48: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:49: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:50: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:51: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:52: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:53: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:54: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:55: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:56: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:76: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:84: Omit int when using unsigned [runtime/unsigned] [1] ERROR: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp:92: Omit int when using unsigned [runtime/unsigned] [1] Total errors found: 30 in 75 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 13
2017-03-11 14:48:22 PST
Comment on
attachment 304137
[details]
Complete patch (1+2) View in context:
https://bugs.webkit.org/attachment.cgi?id=304137&action=review
> Source/WebCore/ChangeLog:12 > + * Configurations/FeatureDefines.xcconfig: For EWS, turn of WebGPU in WebCore. This > + should not be checked in.
Removing this since you've undone the change.
> Source/WebCore/ChangeLog:15 > + * WebCore.xcodeproj/project.pbxproj: Add WebGPU files.
I'm going to add them to PlatformMac.cmake too.
> Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:31 > +/***
I'll replace these with /* FIXME: WebGPU - not implemented yet.
> Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp:52 > + LOG(WebGPU, "-- WebGPUCommandBuffer::WebGPUCommandBuffer() NEW");
I also cleaned these up (my mistake originally)
Dean Jackson
Comment 14
2017-03-11 15:04:42 PST
Created
attachment 304179
[details]
Patch for EWS
Dean Jackson
Comment 15
2017-03-11 15:10:26 PST
Committed
r213762
: <
http://trac.webkit.org/changeset/213762
>
Jon Lee
Comment 16
2017-03-12 20:10:08 PDT
Front end checked in, but back end still needs to be done. Reopening.
Jon Lee
Comment 17
2017-03-13 00:12:33 PDT
***
Bug 169376
has been marked as a duplicate of this bug. ***
Jon Lee
Comment 18
2017-03-13 00:12:36 PDT
***
Bug 169377
has been marked as a duplicate of this bug. ***
Jon Lee
Comment 19
2017-03-13 00:12:39 PDT
***
Bug 169378
has been marked as a duplicate of this bug. ***
Jon Lee
Comment 20
2017-03-13 00:12:42 PDT
***
Bug 169379
has been marked as a duplicate of this bug. ***
Jon Lee
Comment 21
2017-03-13 00:12:44 PDT
***
Bug 169380
has been marked as a duplicate of this bug. ***
Jon Lee
Comment 22
2017-03-13 00:12:50 PDT
***
Bug 169381
has been marked as a duplicate of this bug. ***
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