[webkit-changes] [235402] trunk/Tools

2018-08-27 Thread justin_fan
Title: [235402] trunk/Tools








Revision 235402
Author justin_...@apple.com
Date 2018-08-27 14:36:45 -0700 (Mon, 27 Aug 2018)


Log Message
Add Justin Fan to list of WebKit contributors
https://bugs.webkit.org/show_bug.cgi?id=184431

* Scripts/webkitpy/common/config/contributors.json:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/config/contributors.json




Diff

Modified: trunk/Tools/ChangeLog (235401 => 235402)

--- trunk/Tools/ChangeLog	2018-08-27 21:27:58 UTC (rev 235401)
+++ trunk/Tools/ChangeLog	2018-08-27 21:36:45 UTC (rev 235402)
@@ -1,3 +1,10 @@
+2018-08-27  Justin Fan  
+
+Add Justin Fan to list of WebKit contributors
+https://bugs.webkit.org/show_bug.cgi?id=184431
+
+* Scripts/webkitpy/common/config/contributors.json:
+
 2018-08-27  Simon Fraser  
 
 Convert timeout values in WebKitTestRunner to WTF::Seconds


Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (235401 => 235402)

--- trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2018-08-27 21:27:58 UTC (rev 235401)
+++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2018-08-27 21:36:45 UTC (rev 235402)
@@ -3271,6 +3271,13 @@
   ],
   "status" : "committer"
},
+   "Justin Fan" : {
+  "emails" : [
+ "justin_...@apple.com"
+  ],
+  "expertise" : "WebGL, Canvas",
+  "status" : "committer"
+   },
"Justin Garcia" : {
   "emails" : [
  "justin.gar...@apple.com"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [235417] trunk

2018-08-27 Thread justin_fan
Title: [235417] trunk








Revision 235417
Author justin_...@apple.com
Date 2018-08-27 17:37:49 -0700 (Mon, 27 Aug 2018)


Log Message
WebGL 2 conformance: framebuffer-test
https://bugs.webkit.org/show_bug.cgi?id=188812

Reviewed by Jon Lee.

Source/WebCore:

Update WebGL 2 implementation to handle READ_FRAMEBUFFER and default framebuffer conformance. Also taking this
chance to fix memory leak in PlatformScreenMac/gpuIDForDisplayMask().

Covered by existing WebGL tests as well as newly-enabled webgl/2.0.0/conformance2/renderbuffers/framebuffer-test.html.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::blitFramebuffer):
(WebCore::WebGL2RenderingContext::framebufferTextureLayer):
(WebCore::validateDefaultFramebufferAttachment):
(WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
(WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters):
(WebCore::WebGL2RenderingContext::validateFramebufferTarget):
(WebCore::WebGL2RenderingContext::validateNonDefaultFramebufferAttachment):
(WebCore::WebGL2RenderingContext::getParameter):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::isBound const):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::initializeNewContext):
(WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::bindFramebuffer):
(WebCore::WebGLRenderingContextBase::checkFramebufferStatus):
(WebCore::WebGLRenderingContextBase::deleteFramebuffer):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::framebufferTexture2D):
* html/canvas/WebGLRenderingContextBase.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::blitFramebuffer):
* platform/mac/PlatformScreenMac.mm:
(WebCore::gpuIDForDisplayMask):

LayoutTests:

Update WebGL 2 implementation to handle READ_FRAMEBUFFER and default framebuffer conformance.

* TestExpectations: Unskipping webgl/2.0.0/conformance2/renderbuffers/framebuffer-test.html.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/webgl/2.0.0/conformance2/renderbuffers/framebuffer-test-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h
trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h




Diff

Modified: trunk/LayoutTests/ChangeLog (235416 => 235417)

--- trunk/LayoutTests/ChangeLog	2018-08-28 00:37:17 UTC (rev 235416)
+++ trunk/LayoutTests/ChangeLog	2018-08-28 00:37:49 UTC (rev 235417)
@@ -1,3 +1,14 @@
+2018-08-27  Justin Fan  
+
+WebGL 2 conformance: framebuffer-test
+https://bugs.webkit.org/show_bug.cgi?id=188812
+
+Reviewed by Jon Lee.
+
+Update WebGL 2 implementation to handle READ_FRAMEBUFFER and default framebuffer conformance.
+
+* TestExpectations: Unskipping webgl/2.0.0/conformance2/renderbuffers/framebuffer-test.html.
+
 2018-08-27  Myles C. Maxfield  
 
 Null pointer deref in WidthIterator


Modified: trunk/LayoutTests/TestExpectations (235416 => 235417)

--- trunk/LayoutTests/TestExpectations	2018-08-28 00:37:17 UTC (rev 235416)
+++ trunk/LayoutTests/TestExpectations	2018-08-28 00:37:49 UTC (rev 235417)
@@ -2068,6 +2068,7 @@
 webgl/2.0.0 [ Skip ]
 webgl/2.0.0/conformance2/glsl3 [ Pass ]
 webgl/2.0.0/conformance2/vertex_arrays [ Pass ]
+webgl/2.0.0/conformance2/renderbuffers/framebuffer-test.html [ Pass ]
 
 imported/w3c/web-platform-tests/css/css-display/run-in/run-in-contains-table-row-001.xht [ ImageOnlyFailure ]
 imported/w3c/web-platform-tests/css/css-text-decor/text-emphasis-style-008.html [ ImageOnlyFailure ]


Modified: trunk/LayoutTests/webgl/2.0.0/conformance2/renderbuffers/framebuffer-test-expected.txt (235416 => 235417)

--- trunk/LayoutTests/webgl/2.0.0/conformance2/renderbuffers/framebuffer-test-expected.txt	2018-08-28 00:37:17 UTC (rev 235416)
+++ trunk/LayoutTests/webgl/2.0.0/conformance2/renderbuffers/framebuffer-test-expected.txt	2018-08-28 00:37:49 UTC (rev 235417)
@@ -1,5 +1,65 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance2/renderbuffers/framebuffer-test.html
+gl = wtu.create3DContext(canvas, undefined, 2) is non-null.
+getError was expected value: INVALID_ENUM : getFramebufferAttachmentParameter(COLOR_ATTACHMENT0) on the default framebuffer.
+getError was expected value: NO_ERROR : getFramebufferAttachmentParameter(BACK) on the default framebuffer.
+getError was expected value: NO_ERROR : checkFramebufferStatus on the default framebuffer.
+getError was expected value: INVALID_OPERATION : attach a texture to default 

[webkit-changes] [237170] trunk

2018-10-15 Thread justin_fan
Title: [237170] trunk








Revision 237170
Author justin_...@apple.com
Date 2018-10-15 21:57:47 -0700 (Mon, 15 Oct 2018)


Log Message
Add WebGPU 2018 feature flag and experimental feature flag
https://bugs.webkit.org/show_bug.cgi?id=190509

Reviewed by Dean Jackson.

.:

Update FeatureDefines for WebGPU -> WebMetal renaming, while preserving WebGPU
references for 2018 WebGPU Sketch implementation.

* Source/cmake/OptionsMac.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/_javascript_Core:

Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
for the 2018 WebGPU prototype.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
for the 2018 WebGPU prototype.

* Configurations/FeatureDefines.xcconfig:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebGPUEnabled):
(WebCore::RuntimeEnabledFeatures::webGPUEnabled const):

Source/WebCore/PAL:

Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
for the 2018 WebGPU prototype.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
for the 2018 WebGPU prototype.

* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferences.yaml:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
for the 2018 WebGPU prototype.

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences webGPUEnabled]):
(-[WebPreferences setWebGPUEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
for the 2018 WebGPU prototype.

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Modified Paths

trunk/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit/Shared/WebPreferences.yaml
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
trunk/Source/cmake/OptionsMac.cmake
trunk/Source/cmake/tools/vsprops/FeatureDefines.props
trunk/Source/cmake/tools/vsprops/FeatureDefinesCairo.props
trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/TestOptions.cpp
trunk/Tools/DumpRenderTree/TestOptions.h
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig




Diff

Modified: trunk/ChangeLog (237169 => 237170)

--- trunk/ChangeLog	2018-10-16 01:30:21 UTC (rev 237169)
+++ trunk/ChangeLog	2018-10-16 04:57:47 UTC (rev 237170)
@@ -1,3 +1,17 @@
+2018-10-15  Justin Fan  
+
+Add WebGPU 2018 feature flag and experimental feature flag
+https://bugs.webkit.org/show_bug.cgi?id=190509
+
+Reviewed by Dean Jackson.
+
+Update FeatureDefines for WebGPU -> WebMetal renaming, while preserving WebGPU
+references for 2018 WebGPU Sketch implementation.
+
+* Source/cmake/OptionsMac.cmake:
+* Source/cmake/tools/vsprops/FeatureDefines.props:
+* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:
+
 2018-10-15  Christopher Reid  
 
 [Curl][WinCairo] Add Public Suffix support to WinCairo


Modified: trunk/Source/_javascript_Core/ChangeLog (237169 => 237170)

--- trunk/Source/_javascript_Core/ChangeLog	2018-10-16 01:30:21 UTC (rev 237169)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-10-16 04:57:47 UTC (rev 237170)
@@ -1,3 +1,15 @@
+2018-10-15  Justin Fan  
+
+Add WebGPU 2018 feature flag and experimental feature flag
+https://bugs.webkit.org/show_bug.cgi?id=190509
+
+Reviewed by Dean Jackson.
+
+Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
+for the 2018 WebGPU prototype.
+
+* 

[webkit-changes] [237279] trunk/LayoutTests

2018-10-18 Thread justin_fan
Title: [237279] trunk/LayoutTests








Revision 237279
Author justin_...@apple.com
Date 2018-10-18 20:54:51 -0700 (Thu, 18 Oct 2018)


Log Message
Add test expectations for webgpu-enabled.html
https://bugs.webkit.org/show_bug.cgi?id=190739

Unreviewed test gardening.

Added forgotten expectations for webgpu-enabled, and updated some expectations
to match the WebGPU -> WebMetal naming and new WebGPU tests.


* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wpe/TestExpectations:
* webgpu/webgpu-enabled-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations
trunk/LayoutTests/platform/mac-wk1/TestExpectations
trunk/LayoutTests/platform/win/TestExpectations
trunk/LayoutTests/platform/wincairo/TestExpectations
trunk/LayoutTests/platform/wpe/TestExpectations


Added Paths

trunk/LayoutTests/webgpu/webgpu-enabled-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (237278 => 237279)

--- trunk/LayoutTests/ChangeLog	2018-10-19 02:48:59 UTC (rev 237278)
+++ trunk/LayoutTests/ChangeLog	2018-10-19 03:54:51 UTC (rev 237279)
@@ -1,3 +1,20 @@
+2018-10-18  Justin Fan  
+
+Add test expectations for webgpu-enabled.html
+https://bugs.webkit.org/show_bug.cgi?id=190739
+
+Unreviewed test gardening.
+
+Added forgotten expectations for webgpu-enabled, and updated some expectations 
+to match the WebGPU -> WebMetal naming and new WebGPU tests.
+
+* platform/ios/TestExpectations:
+* platform/mac-wk1/TestExpectations:
+* platform/win/TestExpectations:
+* platform/wincairo/TestExpectations:
+* platform/wpe/TestExpectations:
+* webgpu/webgpu-enabled-expected.txt: Added.
+
 2018-10-18  Justin Michaud  
 
 Add new image type for CSS painting API


Modified: trunk/LayoutTests/platform/ios/TestExpectations (237278 => 237279)

--- trunk/LayoutTests/platform/ios/TestExpectations	2018-10-19 02:48:59 UTC (rev 237278)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2018-10-19 03:54:51 UTC (rev 237279)
@@ -35,10 +35,11 @@
 http/tests/fullscreen
 compositing/no-compositing-when-fulll-screen-is-present.html
 
-# WebGPU is not enabled on iOS Simulator.
+# WebMetal and WebGPU are not enabled on iOS Simulator.
 fast/canvas/webmetal
 inspector/canvas/create-context-webmetal.html [ Skip ]
 inspector/canvas/resolveCanvasContext-webmetal.html [ Skip ]
+webgpu [ Skip ]
 
 # Encrypted Media Extensions are not enabled
 media/encrypted-media/


Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (237278 => 237279)

--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2018-10-19 02:48:59 UTC (rev 237278)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2018-10-19 03:54:51 UTC (rev 237279)
@@ -643,3 +643,6 @@
 webkit.org/b/189908 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ]
 
 webkit.org/b/189756 [ Mojave+ ] compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html [ Pass ImageOnlyFailure ]
+
+# WebGPU is not supported on WK1.
+webgpu [ Skip ]


Modified: trunk/LayoutTests/platform/win/TestExpectations (237278 => 237279)

--- trunk/LayoutTests/platform/win/TestExpectations	2018-10-19 02:48:59 UTC (rev 237278)
+++ trunk/LayoutTests/platform/win/TestExpectations	2018-10-19 03:54:51 UTC (rev 237279)
@@ -4229,3 +4229,6 @@
 webkit.org/b/190472 fast/forms/fieldset/fieldset-elements-htmlcollection.html [ Failure ]
 
 webkit.org/b/190520 editing/pasteboard/copy-paste-across-shadow-boundaries-with-style-2.html [ Crash ]
+
+# WebGPU is not supported on Windows
+webgpu [ Skip ]


Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (237278 => 237279)

--- trunk/LayoutTests/platform/wincairo/TestExpectations	2018-10-19 02:48:59 UTC (rev 237278)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations	2018-10-19 03:54:51 UTC (rev 237279)
@@ -288,10 +288,11 @@
 webgl/webgl2-rendering-context-defined.html [ Skip ]
 webgl/webgl2-rendering-context-obtain.html [ Skip ]
 
-# WEBGPU is disabled
-fast/canvas/webgpu [ Skip ]
-inspector/canvas/create-context-webgpu.html [ Skip ]
-inspector/canvas/resolveCanvasContext-webgpu.html [ Skip ]
+# WEBMETAL and WEBGPU are disabled
+fast/canvas/webmetal [ Skip ]
+inspector/canvas/create-context-webmetal.html [ Skip ]
+inspector/canvas/resolveCanvasContext-webmetal.html [ Skip ]
+webgpu [ Skip ]
 
 # WIRELESS_PLAYBACK_TARGET is disabled
 media/airplay-target-availability.html [ Skip ]


Modified: trunk/LayoutTests/platform/wpe/TestExpectations (237278 => 237279)

--- trunk/LayoutTests/platform/wpe/TestExpectations	2018-10-19 02:48:59 UTC (rev 237278)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2018-10-19 03:54:51 UTC (rev 237279)
@@ -282,8 +282,9 @@
 Bug(WPE) js/stringimpl-to-jsstring-on-large-strings-2.html [ Skip ]
 Bug(WPE) js/stringimpl-to-jsstring-on-large-strings-3.html 

[webkit-changes] [237306] trunk

2018-10-19 Thread justin_fan
Title: [237306] trunk








Revision 237306
Author justin_...@apple.com
Date 2018-10-19 15:19:12 -0700 (Fri, 19 Oct 2018)


Log Message
[WebGPU] Add stubs for WebGPUSwapChain and WebGPURenderingContext
https://bugs.webkit.org/show_bug.cgi?id=190742

Reviewed by Dean Jackson.

Source/WebCore:

Test: updated webgpu-enabled.html to check for WebGPURenderingContext.

Implement support for creating a "webgpu" context from an HTML canvas.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/webgpu/WebGPURenderingContext.cpp: Added.
(WebCore::WebGPURenderingContext::create):
(WebCore::WebGPURenderingContext::WebGPURenderingContext):
* Modules/webgpu/WebGPURenderingContext.h: Added.
* Modules/webgpu/WebGPURenderingContext.idl: Added.
* Modules/webgpu/WebGPUSwapChain.cpp: Added.
(WebCore::WebGPUSwapChain::configure):
(WebCore::WebGPUSwapChain::present):
(WebCore::WebGPUSwapChain::reshape):
(WebCore::WebGPUSwapChain::markLayerComposited):
* Modules/webgpu/WebGPUSwapChain.h: Added.
(WebCore::WebGPUSwapChain::WebGPUSwapChain):
* Modules/webgpu/WebGPUSwapChain.idl: Added.
* Modules/webgpu/WebGPUSwapChainDescriptor.h: Added.
* Modules/webgpu/WebGPUSwapChainDescriptor.idl: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/Document.cpp:
(WebCore::Document::getCSSCanvasContext):
* dom/Document.h:
* dom/Document.idl:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::isWebGPUType):
(WebCore::HTMLCanvasElement::createContextWebGPU):
(WebCore::HTMLCanvasElement::getContextWebGPU):
* html/HTMLCanvasElement.h:
* html/HTMLCanvasElement.idl:
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::isWebGPU const):

LayoutTests:

Updated basic webgpu feature detection test to check for WebGPURenderingContext.

* webgpu/webgpu-enabled-expected.txt:
* webgpu/webgpu-enabled.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/webgpu-enabled-expected.txt
trunk/LayoutTests/webgpu/webgpu-enabled.html
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/dom/Document.h
trunk/Source/WebCore/dom/Document.idl
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
trunk/Source/WebCore/html/HTMLCanvasElement.h
trunk/Source/WebCore/html/HTMLCanvasElement.idl
trunk/Source/WebCore/html/canvas/CanvasRenderingContext.h


Added Paths

trunk/Source/WebCore/Modules/webgpu/WebGPURenderingContext.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPURenderingContext.h
trunk/Source/WebCore/Modules/webgpu/WebGPURenderingContext.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChain.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChain.h
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChain.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChainDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChainDescriptor.idl




Diff

Modified: trunk/LayoutTests/ChangeLog (237305 => 237306)

--- trunk/LayoutTests/ChangeLog	2018-10-19 22:00:32 UTC (rev 237305)
+++ trunk/LayoutTests/ChangeLog	2018-10-19 22:19:12 UTC (rev 237306)
@@ -1,3 +1,15 @@
+2018-10-19  Justin Fan  
+
+[WebGPU] Add stubs for WebGPUSwapChain and WebGPURenderingContext
+https://bugs.webkit.org/show_bug.cgi?id=190742
+
+Reviewed by Dean Jackson.
+
+Updated basic webgpu feature detection test to check for WebGPURenderingContext.
+
+* webgpu/webgpu-enabled-expected.txt: 
+* webgpu/webgpu-enabled.html:
+
 2018-10-19  Wenson Hsieh  
 
 [iOS] [Datalist] Can't pick datalist suggestions in a stock WKWebView


Modified: trunk/LayoutTests/webgpu/webgpu-enabled-expected.txt (237305 => 237306)

--- trunk/LayoutTests/webgpu/webgpu-enabled-expected.txt	2018-10-19 22:00:32 UTC (rev 237305)
+++ trunk/LayoutTests/webgpu/webgpu-enabled-expected.txt	2018-10-19 22:19:12 UTC (rev 237306)
@@ -1,6 +1,4 @@
 PASS [object WebGPU] is defined.
-PASS [object WebGPUAdapter] is defined.
-PASS [object WebGPUDevice] is defined.
 PASS successfullyParsed is true
 
 TEST COMPLETE


Modified: trunk/LayoutTests/webgpu/webgpu-enabled.html (237305 => 237306)

--- trunk/LayoutTests/webgpu/webgpu-enabled.html	2018-10-19 22:00:32 UTC (rev 237305)
+++ trunk/LayoutTests/webgpu/webgpu-enabled.html	2018-10-19 22:19:12 UTC (rev 237306)
@@ -7,11 +7,22 @@
 window.testRunner.dumpAsText();
 
 function runTest() {
+let canvas = document.createElement("canvas");
+let context = canvas.getContext("webgpu");
+if (!context)
+testFailed("Could not create WebGPU context!");
+
 shouldBeDefined(window.webgpu);
 window.webgpu.requestAdapter({ powerPreference: "default" }).then(adapter => {
-shouldBeDefined(adapter);
+if (!adapter) {
+testFailed("Could not 

[webkit-changes] [237239] trunk

2018-10-17 Thread justin_fan
Title: [237239] trunk








Revision 237239
Author justin_...@apple.com
Date 2018-10-17 16:30:56 -0700 (Wed, 17 Oct 2018)


Log Message
[WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
https://bugs.webkit.org/show_bug.cgi?id=190653

Reviewed by Dean Jackson.

Source/WebCore:

Test: webgpu/webgpu-enabled.html

Add WebGPU Sketch bindings for window.webgpu, WebGPUAdapter, WebGPUAdapterDescriptor,
and WebGPUDevice creation. Based off IDL commit version b6c61ee.
https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl

* CMakeLists.txt:
* DerivedSources.make:
* Modules/webgpu/DOMWindowWebGPU.cpp: Added.
(WebCore::DOMWindowWebGPU::DOMWindowWebGPU):
(WebCore::DOMWindowWebGPU::supplementName):
(WebCore::DOMWindowWebGPU::from):
(WebCore::DOMWindowWebGPU::webgpu):
(WebCore::DOMWindowWebGPU::webgpu const):
* Modules/webgpu/DOMWindowWebGPU.h: Added.
* Modules/webgpu/DOMWindowWebGPU.idl: Added.
* Modules/webgpu/WebGPU.cpp: Added.
(WebCore::WebGPU::create):
(WebCore::WebGPU::requestAdapter const):
* Modules/webgpu/WebGPU.h: Added.
* Modules/webgpu/WebGPU.idl: Added.
* Modules/webgpu/WebGPUAdapter.cpp: Added.
(WebCore::WebGPUAdapter::create):
(WebCore::WebGPUAdapter::WebGPUAdapter):
(WebCore::WebGPUAdapter::createDevice):
* Modules/webgpu/WebGPUAdapter.h: Added.
* Modules/webgpu/WebGPUAdapter.idl: Added.
* Modules/webgpu/WebGPUAdapterDescriptor.h: Added.
* Modules/webgpu/WebGPUAdapterDescriptor.idl: Added.
* Modules/webgpu/WebGPUDevice.cpp: Added.
(WebCore::WebGPUDevice::create):
(WebCore::WebGPUDevice::WebGPUDevice):
* Modules/webgpu/WebGPUDevice.h: Added.
(WebCore::WebGPUDevice::adapter const):
* Modules/webgpu/WebGPUDevice.idl: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

Small test to validate creation of a WebGPUDevice when WebGPU is enabled.

* webgpu/webgpu-enabled.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h


Added Paths

trunk/LayoutTests/webgpu/
trunk/LayoutTests/webgpu/webgpu-enabled.html
trunk/Source/WebCore/Modules/webgpu/
trunk/Source/WebCore/Modules/webgpu/DOMWindowWebGPU.cpp
trunk/Source/WebCore/Modules/webgpu/DOMWindowWebGPU.h
trunk/Source/WebCore/Modules/webgpu/DOMWindowWebGPU.idl
trunk/Source/WebCore/Modules/webgpu/WebGPU.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPU.h
trunk/Source/WebCore/Modules/webgpu/WebGPU.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.h
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapterDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapterDescriptor.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl




Diff

Modified: trunk/LayoutTests/ChangeLog (237238 => 237239)

--- trunk/LayoutTests/ChangeLog	2018-10-17 23:10:33 UTC (rev 237238)
+++ trunk/LayoutTests/ChangeLog	2018-10-17 23:30:56 UTC (rev 237239)
@@ -1,3 +1,14 @@
+2018-10-17  Justin Fan  
+
+[WebGPU] Implement WebGPU bindings up through WebGPUDevice creation
+https://bugs.webkit.org/show_bug.cgi?id=190653
+
+Reviewed by Dean Jackson.
+
+Small test to validate creation of a WebGPUDevice when WebGPU is enabled.
+
+* webgpu/webgpu-enabled.html: Added.
+
 2018-10-17  Andy Estes  
 
 [Apple Pay] Increment the API version to 5


Added: trunk/LayoutTests/webgpu/webgpu-enabled.html (0 => 237239)

--- trunk/LayoutTests/webgpu/webgpu-enabled.html	(rev 0)
+++ trunk/LayoutTests/webgpu/webgpu-enabled.html	2018-10-17 23:30:56 UTC (rev 237239)
@@ -0,0 +1,26 @@
+
+
+
+if (window.testRunner)
+window.testRunner.dumpAsText();
+
+function runTest() {
+shouldBeDefined(window.webgpu);
+window.webgpu.requestAdapter({ powerPreference: "default" }).then(adapter => {
+shouldBeDefined(adapter);
+let defaultDevice = adapter.createDevice();
+shouldBeDefined(defaultDevice);
+}).catch(error => {
+testFailed(error);
+});
+}
+
+runTest();
+
+var successfullyParsed = true;
+
+

[webkit-changes] [237723] trunk

2018-11-02 Thread justin_fan
Title: [237723] trunk








Revision 237723
Author justin_...@apple.com
Date 2018-11-02 00:09:09 -0700 (Fri, 02 Nov 2018)


Log Message
[WebGPU] Experimental prototype for MSL shaders
https://bugs.webkit.org/show_bug.cgi?id=191084

Reviewed by Dean Jackson.

Source/WebCore:

Begin implementation for WebGPUDevice and WebGPUShaderModule and associated descriptor objects.

Test: webgpu/webgpu-basics.html
Test: webgpu/shader-modules.html

* CMakeLists.txt:
* DerivedSources.make:
* Modules/webgpu/GPUDevice.cpp:
(WebCore::GPUDevice::createShaderModule const):
* Modules/webgpu/GPUDevice.h:
(WebCore::GPUDevice::platformDevice const):
* Modules/webgpu/GPUShaderModule.h:
(WebCore::GPUShaderModule::platformShaderModule const):
* Modules/webgpu/GPUShaderModuleDescriptor.h:
* Modules/webgpu/WebGPU.cpp:
(WebCore::WebGPU::requestAdapter const):
* Modules/webgpu/WebGPUAdapter.cpp:
(WebCore::WebGPUAdapter::create):
(WebCore::WebGPUAdapter::createDevice):
* Modules/webgpu/WebGPUAdapter.h:
* Modules/webgpu/WebGPUAdapter.idl:
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::create):
(WebCore::WebGPUDevice::WebGPUDevice):
(WebCore::WebGPUDevice::createShaderModule const):
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.idl:
* Modules/webgpu/WebGPUShaderModule.cpp:
(WebCore::WebGPUShaderModule::create):
(WebCore::WebGPUShaderModule::WebGPUShaderModule):
* Modules/webgpu/WebGPUShaderModule.h:
* Modules/webgpu/WebGPUShaderModule.idl:
* Modules/webgpu/WebGPUShaderModuleDescriptor.h:
* Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
* Modules/webgpu/WebGPUSwapChain.cpp:
(WebCore::WebGPUSwapChain::configure):
* Modules/webgpu/WebGPUSwapChain.h:
* Modules/webgpu/WebGPUSwapChain.idl:
* Modules/webgpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::create):
(WebCore::GPUDevice::GPUDevice):
* Modules/webgpu/cocoa/GPUShaderModuleMetal.mm:
(WebCore::GPUShaderModule::create):
(WebCore::GPUShaderModule::GPUShaderModule):
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* platform/Logging.h:

Source/WTF:

Disabling WebGPU on non-Cocoa platforms and iOS Simulator.

* wtf/Platform.h:

LayoutTests:

* webgpu/shader-modules.html: Added.
* webgpu/shader-modules-expected.html: Added.
* webgpu/webgpu-basics.html: Added.
* webgpu/webgpu-basics-expected.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/Platform.h
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/webgpu/WebGPU.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.h
trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChain.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChain.h
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChain.idl
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/SourcesCocoa.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
trunk/Source/WebCore/platform/Logging.h


Added Paths

trunk/LayoutTests/webgpu/shader-modules-expected.txt
trunk/LayoutTests/webgpu/shader-modules.html
trunk/LayoutTests/webgpu/webgpu-basics-expected.txt
trunk/LayoutTests/webgpu/webgpu-basics.html
trunk/Source/WebCore/Modules/webgpu/GPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/GPUDevice.h
trunk/Source/WebCore/Modules/webgpu/GPUShaderModule.h
trunk/Source/WebCore/Modules/webgpu/GPUShaderModuleDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModule.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModule.h
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModule.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModuleDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModuleDescriptor.idl
trunk/Source/WebCore/Modules/webgpu/cocoa/
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUDeviceMetal.mm
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUShaderModuleMetal.mm


Removed Paths

trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChainDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChainDescriptor.idl




Diff

Modified: trunk/LayoutTests/ChangeLog (237722 => 237723)

--- trunk/LayoutTests/ChangeLog	2018-11-02 07:04:30 UTC (rev 237722)
+++ trunk/LayoutTests/ChangeLog	2018-11-02 07:09:09 UTC (rev 237723)
@@ -1,3 +1,15 @@
+2018-11-02  Justin Fan  
+
+[WebGPU] Experimental prototype for MSL shaders
+https://bugs.webkit.org/show_bug.cgi?id=191084
+
+Reviewed by Dean Jackson.
+
+* webgpu/shader-modules.html: Added.
+* webgpu/shader-modules-expected.html: Added.
+* webgpu/webgpu-basics.html: Added.
+* webgpu/webgpu-basics-expected.html: Added.
+
 2018-11-01  Devin Rousso  
 
 

[webkit-changes] [238245] trunk

2018-11-15 Thread justin_fan
Title: [238245] trunk








Revision 238245
Author justin_...@apple.com
Date 2018-11-15 13:20:27 -0800 (Thu, 15 Nov 2018)


Log Message
[WebGPU] WebGPUCommandBuffer prototype
https://bugs.webkit.org/show_bug.cgi?id=191663

Reviewed by Dean Jackson.

Begin implementation of WebGPUCommandBuffers as well as GPUQueues (MTLCommandBuffer, MTLCommandQueue).

Source/WebCore:

Test: webgpu/command-buffers.html

* CMakeLists.txt:
* DerivedSources.make:
* Modules/webgpu/GPUCommandBuffer.h: Added. Wrapper class around a MTLCommandBuffer.
* Modules/webgpu/GPUDevice.cpp:
(WebCore::GPUDevice::createCommandBuffer): Added.
(WebCore::GPUDevice::getQueue): Returns RefPtr to the device's singleton queue.
* Modules/webgpu/GPUDevice.h: Now manages the device's GPUQueue.
(WebCore::GPUDevice::platformDevice const):
* Modules/webgpu/GPUQueue.h: Added. Wrapper class around a MTLCommandQueue.
(WebCore::GPUQueue::platformQueue const):
* Modules/webgpu/GPURenderPipeline.h: Moved from Source/WebCore/Modules/webgpu/cocoa/GPURenderPipeline.h.
(WebCore::GPURenderPipeline::platformRenderPipeline const):
* Modules/webgpu/GPUShaderModule.h:
(WebCore::GPUShaderModule::platformShaderModule const):
* Modules/webgpu/GPUSwapChain.h: Moved from Source/WebCore/Modules/webgpu/cocoa/GPUSwapChain.h.
(WebCore::GPUSwapChain::platformLayer const):
* Modules/webgpu/WebGPUCommandBuffer.cpp: Added. Web interface for a GPU device's command buffer.
(WebCore::WebGPUCommandBuffer::create):
(WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
* Modules/webgpu/WebGPUCommandBuffer.h: Added.
* Modules/webgpu/WebGPUCommandBuffer.idl: Added.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createCommandBuffer const): Added.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.idl:
* Modules/webgpu/cocoa/GPUCommandBufferMetal.mm: Added. MTLCommandBuffer impl for GPUCommandBuffer.
(WebCore::GPUCommandBuffer::create): Create a MTLCommandBuffer from the MTLCommandQueue.
(WebCore::GPUCommandBuffer::GPUCommandBuffer):
* Modules/webgpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::GPUDevice):
* Modules/webgpu/cocoa/GPUQueueMetal.mm: Added. MTLCommandQueue impl for GPUQueue.
(WebCore::GPUQueue::create):
(WebCore::GPUQueue::GPUQueue):
* Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::GPURenderPipeline::GPURenderPipeline):
* Modules/webgpu/cocoa/GPUShaderModuleMetal.mm:
(WebCore::GPUShaderModule::create):
(WebCore::GPUShaderModule::GPUShaderModule):
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

New testing for WebGPUCommandBuffers, to be fleshed out when WebGPUCommandBufferDescriptors
are added to the specification.

* webgpu/command-buffers-expected.txt: Added.
* webgpu/command-buffers.html: Basic functionality, with more stress tests to be added when the spec is updated.
* webgpu/webgpu-basics.html: Updated to create the command buffer used by later rendering operations.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/webgpu-basics.html
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/webgpu/GPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/GPUDevice.h
trunk/Source/WebCore/Modules/webgpu/GPUShaderModule.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUDeviceMetal.mm
trunk/Source/WebCore/Modules/webgpu/cocoa/GPURenderPipelineMetal.mm
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUShaderModuleMetal.mm
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/SourcesCocoa.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h


Added Paths

trunk/LayoutTests/webgpu/command-buffers-expected.txt
trunk/LayoutTests/webgpu/command-buffers.html
trunk/Source/WebCore/Modules/webgpu/GPUCommandBuffer.h
trunk/Source/WebCore/Modules/webgpu/GPUQueue.h
trunk/Source/WebCore/Modules/webgpu/GPURenderPipeline.h
trunk/Source/WebCore/Modules/webgpu/GPUSwapChain.h
trunk/Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.h
trunk/Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.idl
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUCommandBufferMetal.mm
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUQueueMetal.mm


Removed Paths

trunk/Source/WebCore/Modules/webgpu/cocoa/GPURenderPipeline.h
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUSwapChain.h




Diff

Modified: trunk/LayoutTests/ChangeLog (238244 => 238245)

--- trunk/LayoutTests/ChangeLog	2018-11-15 21:15:26 UTC (rev 238244)
+++ trunk/LayoutTests/ChangeLog	2018-11-15 21:20:27 UTC (rev 238245)
@@ -1,3 +1,19 @@
+2018-11-15  Justin Fan  
+
+[WebGPU] WebGPUCommandBuffer prototype
+https://bugs.webkit.org/show_bug.cgi?id=191663
+
+Reviewed by Dean 

[webkit-changes] [237912] trunk

2018-11-06 Thread justin_fan
Title: [237912] trunk








Revision 237912
Author justin_...@apple.com
Date 2018-11-06 20:37:04 -0800 (Tue, 06 Nov 2018)


Log Message
[WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
https://bugs.webkit.org/show_bug.cgi?id=191291

Reviewed by Myles Maxfield.

Source/_javascript_Core:

Properly disable WEBGPU on all non-Metal platforms for now.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Test: webgpu/render-pipelines.html
Also update test webgpu/webgpu-basics.html to create a WebGPURenderPipeline.

Begin implementation of WebGPURenderPipeline and WebGPUSwapChain. A WebGPURenderPipeline is backed by a
GPURenderPipeline, created lazily using the properties of the passed-in WebGPURenderPipelineDescriptor.
On Metal-supported systems, GPURenderPipeline is an interface to a MTLRenderPipelineState.
The MTLRenderPipelineState is created with the WebGPUDevice currently configured on the WebGPURenderingContext.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* Modules/webgpu/GPUDevice.cpp:
(WebCore::GPUDevice::createRenderPipeline const):
* Modules/webgpu/GPUDevice.h:
* Modules/webgpu/GPUPipelineDescriptorBase.h:
* Modules/webgpu/GPUPipelineStageDescriptor.h:
* Modules/webgpu/GPURenderPipelineDescriptor.h:
(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
(WebCore::GPURenderPipelineDescriptor::primitiveTopology):
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createRenderPipeline const):
* Modules/webgpu/WebGPUDevice.h:
(WebCore::WebGPUDevice::adapter const):
(WebCore::WebGPUDevice::device const):
* Modules/webgpu/WebGPUDevice.idl:
* Modules/webgpu/WebGPUPipelineDescriptorBase.h:
* Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
* Modules/webgpu/WebGPUPipelineStageDescriptor.h:
* Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
* Modules/webgpu/WebGPURenderPipeline.cpp:
(WebCore::WebGPURenderPipeline::create):
(WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
* Modules/webgpu/WebGPURenderPipeline.h:
* Modules/webgpu/WebGPURenderPipeline.idl:
* Modules/webgpu/WebGPURenderPipelineDescriptor.h:
* Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
* Modules/webgpu/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::create):
(WebCore::WebGPURenderingContext::WebGPURenderingContext):
* Modules/webgpu/WebGPURenderingContext.h:
* Modules/webgpu/WebGPUShaderModule.h:
(WebCore::WebGPUShaderModule::module const):
* Modules/webgpu/WebGPUShaderStage.h:
* Modules/webgpu/WebGPUShaderStage.idl:
* Modules/webgpu/WebGPUSwapChain.cpp:
(WebCore::WebGPUSwapChain::configure):
(WebCore::WebGPUSwapChain::reshape):
(WebCore::WebGPUSwapChain::markLayerComposited):
* Modules/webgpu/WebGPUSwapChain.h:
(WebCore::WebGPUSwapChain::WebGPUSwapChain):
* Modules/webgpu/WebGPUSwapChain.idl:
* Modules/webgpu/cocoa/GPURenderPipeline.h:
(WebCore::GPURenderPipeline::platformRenderPipeline const):
* Modules/webgpu/cocoa/GPURenderPipelineMetal.mm: Added.
(WebCore::setFunctionsForPipelineDescriptor):
(WebCore::GPURenderPipeline::create):
(WebCore::GPURenderPipeline::GPURenderPipeline):
* Modules/webgpu/cocoa/GPUSwapChain.h:
(WebCore::GPUSwapChain::platformLayer const):
* Modules/webgpu/cocoa/GPUSwapChainMetal.mm:
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):
(WebCore::GPUSwapChain::setDevice):
(WebCore::GPUSwapChain::reshape):
(WebCore::GPUSwapChain::present):
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Source/WebCore/PAL:

Properly disable WEBGPU on all non-Metal platforms for now.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Properly disable WEBGPU on all non-Metal platforms for now.

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

Properly disable WEBGPU on all non-Metal platforms for now.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Properly disable WEBGPU on all non-Metal platforms for now.

* wtf/Platform.h:

Tools:

Properly disable WEBGPU on all non-Metal platforms for now.

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

* webgpu/js/set-up-webgpu-contexts.js: Added helper script for running different webgpu tests.
(runWebGPUTests):
(async.runWebGPUTestsOnCanvas):
(async.setUpContexts):
* webgpu/render-pipelines-expected.txt: Added.
* webgpu/render-pipelines.html: Added.
* webgpu/shader-modules-expected.txt:
* webgpu/shader-modules.html: Updated to use functions in set-up-webgpu-contexts.js.
* webgpu/webgpu-basics-expected.txt:
* webgpu/webgpu-basics.html: Updated through creating a WebGPURenderPipeline.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/shader-modules-expected.txt
trunk/LayoutTests/webgpu/shader-modules.html
trunk/LayoutTests/webgpu/webgpu-basics-expected.txt
trunk/LayoutTests/webgpu/webgpu-basics.html
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig

[webkit-changes] [238208] trunk/Source/WebCore

2018-11-14 Thread justin_fan
Title: [238208] trunk/Source/WebCore








Revision 238208
Author justin_...@apple.com
Date 2018-11-14 16:33:53 -0800 (Wed, 14 Nov 2018)


Log Message
[WebGPU] Code quality concerns raised for 191291: [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
https://bugs.webkit.org/show_bug.cgi?id=191383

Reviewed by Dean Jackson.

Covered by existing WebGPU tests introduced in original patch.

* Modules/webgpu/GPUDevice.h:
* Modules/webgpu/GPUPipelineStageDescriptor.h:
* Modules/webgpu/GPURenderPipelineDescriptor.h: Now a base struct with a guaranteed vertex stage member.
(): Refactored into enum class.
(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Removed in favor of init-list construction.
(WebCore::GPURenderPipelineDescriptor::primitiveTopology): Now a proper enum class member.
* Modules/webgpu/GPUShaderModule.h:
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createRenderPipeline const):
* Modules/webgpu/WebGPUShaderModule.h:
(WebCore::WebGPUShaderModule::module const):
* Modules/webgpu/WebGPUShaderStage.h: Replaced enum with constants to better reflect IDL.
* Modules/webgpu/cocoa/GPURenderPipeline.h:
* Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setFunctionsForPipelineDescriptor):
(WebCore::GPURenderPipeline::create):
* Modules/webgpu/cocoa/GPUSwapChain.h:
* WebCore.xcodeproj/project.pbxproj: Removed GPUPipelineDescriptorBase.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webgpu/GPUDevice.h
trunk/Source/WebCore/Modules/webgpu/GPUPipelineStageDescriptor.h
trunk/Source/WebCore/Modules/webgpu/GPURenderPipelineDescriptor.h
trunk/Source/WebCore/Modules/webgpu/GPUShaderModule.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModule.h
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderStage.h
trunk/Source/WebCore/Modules/webgpu/cocoa/GPURenderPipeline.h
trunk/Source/WebCore/Modules/webgpu/cocoa/GPURenderPipelineMetal.mm
trunk/Source/WebCore/Modules/webgpu/cocoa/GPUSwapChain.h
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj




Diff

Modified: trunk/Source/WebCore/ChangeLog (238207 => 238208)

--- trunk/Source/WebCore/ChangeLog	2018-11-15 00:32:57 UTC (rev 238207)
+++ trunk/Source/WebCore/ChangeLog	2018-11-15 00:33:53 UTC (rev 238208)
@@ -1,3 +1,31 @@
+2018-11-14  Justin Fan  
+
+[WebGPU] Code quality concerns raised for 191291: [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
+https://bugs.webkit.org/show_bug.cgi?id=191383
+
+Reviewed by Dean Jackson.
+
+Covered by existing WebGPU tests introduced in original patch.
+
+* Modules/webgpu/GPUDevice.h:
+* Modules/webgpu/GPUPipelineStageDescriptor.h:
+* Modules/webgpu/GPURenderPipelineDescriptor.h: Now a base struct with a guaranteed vertex stage member.
+(): Refactored into enum class.
+(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Removed in favor of init-list construction.
+(WebCore::GPURenderPipelineDescriptor::primitiveTopology): Now a proper enum class member.
+* Modules/webgpu/GPUShaderModule.h:
+* Modules/webgpu/WebGPUDevice.cpp:
+(WebCore::WebGPUDevice::createRenderPipeline const):
+* Modules/webgpu/WebGPUShaderModule.h:
+(WebCore::WebGPUShaderModule::module const):
+* Modules/webgpu/WebGPUShaderStage.h: Replaced enum with constants to better reflect IDL.
+* Modules/webgpu/cocoa/GPURenderPipeline.h:
+* Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
+(WebCore::setFunctionsForPipelineDescriptor):
+(WebCore::GPURenderPipeline::create):
+* Modules/webgpu/cocoa/GPUSwapChain.h:
+* WebCore.xcodeproj/project.pbxproj: Removed GPUPipelineDescriptorBase.
+
 2018-11-14  Joseph Pecoraro  
 
 Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods


Modified: trunk/Source/WebCore/Modules/webgpu/GPUDevice.h (238207 => 238208)

--- trunk/Source/WebCore/Modules/webgpu/GPUDevice.h	2018-11-15 00:32:57 UTC (rev 238207)
+++ trunk/Source/WebCore/Modules/webgpu/GPUDevice.h	2018-11-15 00:33:53 UTC (rev 238208)
@@ -31,19 +31,12 @@
 #include 
 #include 
 
-#if USE(METAL)
 OBJC_PROTOCOL(MTLDevice);
-#endif
 
 namespace WebCore {
 
-#if USE(METAL)
 using PlatformDevice = MTLDevice;
 using PlatformDeviceSmartPtr = RetainPtr;
-#else
-using PlatformDevice = void;
-using PlatformDeviceSmartPtr = RefPtr;
-#endif
 
 class GPUShaderModule;
 class GPURenderPipeline;


Modified: trunk/Source/WebCore/Modules/webgpu/GPUPipelineStageDescriptor.h (238207 => 238208)

--- trunk/Source/WebCore/Modules/webgpu/GPUPipelineStageDescriptor.h	2018-11-15 00:32:57 UTC (rev 238207)
+++ trunk/Source/WebCore/Modules/webgpu/GPUPipelineStageDescriptor.h	2018-11-15 00:33:53 UTC (rev 238208)
@@ -34,8 +34,7 @@
 namespace WebCore {
 
 struct GPUPipelineStageDescriptor {
-const 

[webkit-changes] [236516] trunk/Source/WebCore

2018-09-26 Thread justin_fan
Title: [236516] trunk/Source/WebCore








Revision 236516
Author justin_...@apple.com
Date 2018-09-26 12:16:52 -0700 (Wed, 26 Sep 2018)


Log Message
WebGL 2: Adding logging to in-progress features
https://bugs.webkit.org/show_bug.cgi?id=189978

Reviewed by Jon Lee.

Logging will allow us to better identify the most in-demand WebGL 2 features and prioritize our efforts.

No tests as no change in WebGL functionality.

* html/canvas/WebGL2RenderingContext.cpp: Added logging statement to every function not yet implemented.
(WebCore::WebGL2RenderingContext::blitFramebuffer):
(WebCore::WebGL2RenderingContext::framebufferTextureLayer):
(WebCore::WebGL2RenderingContext::invalidateFramebuffer):
(WebCore::WebGL2RenderingContext::invalidateSubFramebuffer):
(WebCore::WebGL2RenderingContext::readBuffer):
(WebCore::WebGL2RenderingContext::texStorage3D):
(WebCore::WebGL2RenderingContext::texImage2D):
(WebCore::WebGL2RenderingContext::texImage3D):
(WebCore::WebGL2RenderingContext::texSubImage2D):
(WebCore::WebGL2RenderingContext::texSubImage3D):
(WebCore::WebGL2RenderingContext::copyTexSubImage3D):
(WebCore::WebGL2RenderingContext::compressedTexImage2D):
(WebCore::WebGL2RenderingContext::compressedTexImage3D):
(WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
(WebCore::WebGL2RenderingContext::getFragDataLocation):
(WebCore::WebGL2RenderingContext::uniform1ui):
(WebCore::WebGL2RenderingContext::uniform2ui):
(WebCore::WebGL2RenderingContext::uniform3ui):
(WebCore::WebGL2RenderingContext::uniform4ui):
(WebCore::WebGL2RenderingContext::uniform1uiv):
(WebCore::WebGL2RenderingContext::uniform2uiv):
(WebCore::WebGL2RenderingContext::uniform3uiv):
(WebCore::WebGL2RenderingContext::uniform4uiv):
(WebCore::WebGL2RenderingContext::uniformMatrix2x3fv):
(WebCore::WebGL2RenderingContext::uniformMatrix3x2fv):
(WebCore::WebGL2RenderingContext::uniformMatrix2x4fv):
(WebCore::WebGL2RenderingContext::uniformMatrix4x2fv):
(WebCore::WebGL2RenderingContext::uniformMatrix3x4fv):
(WebCore::WebGL2RenderingContext::uniformMatrix4x3fv):
(WebCore::WebGL2RenderingContext::vertexAttribI4i):
(WebCore::WebGL2RenderingContext::vertexAttribI4iv):
(WebCore::WebGL2RenderingContext::vertexAttribI4ui):
(WebCore::WebGL2RenderingContext::vertexAttribI4uiv):
(WebCore::WebGL2RenderingContext::vertexAttribIPointer):
(WebCore::WebGL2RenderingContext::drawRangeElements):
(WebCore::WebGL2RenderingContext::createQuery):
(WebCore::WebGL2RenderingContext::deleteQuery):
(WebCore::WebGL2RenderingContext::isQuery):
(WebCore::WebGL2RenderingContext::beginQuery):
(WebCore::WebGL2RenderingContext::endQuery):
(WebCore::WebGL2RenderingContext::getQuery):
(WebCore::WebGL2RenderingContext::getQueryParameter):
(WebCore::WebGL2RenderingContext::createSampler):
(WebCore::WebGL2RenderingContext::deleteSampler):
(WebCore::WebGL2RenderingContext::isSampler):
(WebCore::WebGL2RenderingContext::bindSampler):
(WebCore::WebGL2RenderingContext::samplerParameteri):
(WebCore::WebGL2RenderingContext::samplerParameterf):
(WebCore::WebGL2RenderingContext::getSamplerParameter):
(WebCore::WebGL2RenderingContext::fenceSync):
(WebCore::WebGL2RenderingContext::isSync):
(WebCore::WebGL2RenderingContext::deleteSync):
(WebCore::WebGL2RenderingContext::clientWaitSync):
(WebCore::WebGL2RenderingContext::waitSync):
(WebCore::WebGL2RenderingContext::getSyncParameter):
(WebCore::WebGL2RenderingContext::createTransformFeedback):
(WebCore::WebGL2RenderingContext::deleteTransformFeedback):
(WebCore::WebGL2RenderingContext::isTransformFeedback):
(WebCore::WebGL2RenderingContext::bindTransformFeedback):
(WebCore::WebGL2RenderingContext::beginTransformFeedback):
(WebCore::WebGL2RenderingContext::endTransformFeedback):
(WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
(WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
(WebCore::WebGL2RenderingContext::pauseTransformFeedback):
(WebCore::WebGL2RenderingContext::resumeTransformFeedback):
(WebCore::WebGL2RenderingContext::bindBufferBase):
(WebCore::WebGL2RenderingContext::bindBufferRange):
(WebCore::WebGL2RenderingContext::getUniformIndices):
(WebCore::WebGL2RenderingContext::getUniformBlockIndex):
(WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter):
(WebCore::WebGL2RenderingContext::getActiveUniformBlockName):
(WebCore::WebGL2RenderingContext::uniformBlockBinding):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (236515 => 236516)

--- trunk/Source/WebCore/ChangeLog	2018-09-26 19:13:53 UTC (rev 236515)
+++ trunk/Source/WebCore/ChangeLog	2018-09-26 19:16:52 UTC (rev 236516)
@@ -1,3 +1,88 @@
+2018-09-26  Justin Fan  
+
+WebGL 2: Adding logging to in-progress features
+https://bugs.webkit.org/show_bug.cgi?id=189978
+
+Reviewed by Jon Lee.
+
+Logging will allow us to better identify the most in-demand WebGL 2 features and prioritize our efforts.
+
+No tests as no change 

[webkit-changes] [236537] trunk/LayoutTests

2018-09-26 Thread justin_fan
Title: [236537] trunk/LayoutTests








Revision 236537
Author justin_...@apple.com
Date 2018-09-26 19:00:32 -0700 (Wed, 26 Sep 2018)


Log Message
WebGL 2: updated passing test expectations for deqp/primitiverestart
https://bugs.webkit.org/show_bug.cgi?id=189981

Reviewed by Jon Lee.

Test-expectation updates for trac.webkit.org/changeset/236490; these are still to be skipped on ews.

* webgl/2.0.0/deqp/functional/gles3/primitiverestart/00-expected.txt:
* webgl/2.0.0/deqp/functional/gles3/primitiverestart/01-expected.txt:
* webgl/2.0.0/deqp/functional/gles3/primitiverestart/02-expected.txt:
* webgl/2.0.0/deqp/functional/gles3/primitiverestart/03-expected.txt:
* webgl/2.0.0/deqp/functional/gles3/primitiverestart/04-expected.txt:
* webgl/2.0.0/deqp/functional/gles3/primitiverestart/05-expected.txt:
* webgl/2.0.0/deqp/functional/gles3/primitiverestart/06-expected.txt:
* webgl/2.0.0/deqp/functional/gles3/primitiverestart/07-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/00-expected.txt
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/01-expected.txt
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/02-expected.txt
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/03-expected.txt
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/04-expected.txt
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/05-expected.txt
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/06-expected.txt
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/07-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (236536 => 236537)

--- trunk/LayoutTests/ChangeLog	2018-09-27 01:42:24 UTC (rev 236536)
+++ trunk/LayoutTests/ChangeLog	2018-09-27 02:00:32 UTC (rev 236537)
@@ -1,3 +1,21 @@
+2018-09-26  Justin Fan  
+
+WebGL 2: updated passing test expectations for deqp/primitiverestart
+https://bugs.webkit.org/show_bug.cgi?id=189981
+
+Reviewed by Jon Lee.
+
+Test-expectation updates for trac.webkit.org/changeset/236490; these are still to be skipped on ews.
+
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/00-expected.txt:
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/01-expected.txt:
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/02-expected.txt:
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/03-expected.txt:
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/04-expected.txt:
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/05-expected.txt:
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/06-expected.txt:
+* webgl/2.0.0/deqp/functional/gles3/primitiverestart/07-expected.txt:
+
 2018-09-26  Alex Christensen  
 
 Unreviewed, rolling out r236524.


Modified: trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/00-expected.txt (236536 => 236537)

--- trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/00-expected.txt	2018-09-27 01:42:24 UTC (rev 236536)
+++ trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/primitiverestart/00-expected.txt	2018-09-27 02:00:32 UTC (rev 236537)
@@ -1,69 +1,5 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../../../resources/webgl_test_files/deqp/functional/gles3/primitiverestart/00.html
-[ 1: FAIL ] primitive_restart.basic.points.unsigned_byte.draw_elements:
-[ 2: FAIL ] primitive_restart.basic.points.unsigned_byte.draw_elements_instanced:
-[ 3: PASS ] primitive_restart.basic.points.unsigned_byte.draw_range_elements:
-[ 4: FAIL ] primitive_restart.basic.points.unsigned_short.draw_elements:
-[ 5: FAIL ] primitive_restart.basic.points.unsigned_short.draw_elements_instanced:
-[ 6: PASS ] primitive_restart.basic.points.unsigned_short.draw_range_elements:
-[ 7: FAIL ] primitive_restart.basic.points.unsigned_int.draw_elements:
-[ 8: FAIL ] primitive_restart.basic.points.unsigned_int.draw_elements_instanced:
-[ 9: PASS ] primitive_restart.basic.points.unsigned_int.draw_range_elements:
-[ 10: FAIL ] primitive_restart.basic.line_strip.unsigned_byte.draw_elements:
-[ 11: FAIL ] primitive_restart.basic.line_strip.unsigned_byte.draw_elements_instanced:
-[ 12: PASS ] primitive_restart.basic.line_strip.unsigned_byte.draw_range_elements:
-[ 13: FAIL ] primitive_restart.basic.line_strip.unsigned_short.draw_elements:
-[ 14: FAIL ] primitive_restart.basic.line_strip.unsigned_short.draw_elements_instanced:
-[ 15: PASS ] primitive_restart.basic.line_strip.unsigned_short.draw_range_elements:
-[ 16: FAIL ] primitive_restart.basic.line_strip.unsigned_int.draw_elements:
-[ 17: FAIL ] primitive_restart.basic.line_strip.unsigned_int.draw_elements_instanced:
-[ 18: PASS ] primitive_restart.basic.line_strip.unsigned_int.draw_range_elements:
-[ 19: FAIL ] 

[webkit-changes] [236490] trunk

2018-09-25 Thread justin_fan
Title: [236490] trunk








Revision 236490
Author justin_...@apple.com
Date 2018-09-25 17:24:52 -0700 (Tue, 25 Sep 2018)


Log Message
WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample
https://bugs.webkit.org/show_bug.cgi?id=189625


Reviewed by Dean Jackson.

Source/WebCore:

Ref test: webgl/webgl2-primitive-restart.html.

Implement support for Primitive Restart Fixed Index as expected
by the WebGL 2 specifications.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::validateIndexArrayConservative):
* html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::getLastIndex): Template that must be defined in header.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateIndexArrayPrecise):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::primitiveRestartIndex):

LayoutTests:

Implement support for Primitive Restart Fixed Index as expected
by the WebGL 2 specifications.

* TestExpectations: Skip some flaky tests between different Mac machines under 2.0.0.
* webgl/webgl2-primitive-restart.html: Canary ref test to be run as part of LayoutTests suite.
* webgl/webgl2-primitive-restart-expected.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp


Added Paths

trunk/LayoutTests/webgl/webgl2-primitive-restart-expected.html
trunk/LayoutTests/webgl/webgl2-primitive-restart.html




Diff

Modified: trunk/LayoutTests/ChangeLog (236489 => 236490)

--- trunk/LayoutTests/ChangeLog	2018-09-26 00:13:59 UTC (rev 236489)
+++ trunk/LayoutTests/ChangeLog	2018-09-26 00:24:52 UTC (rev 236490)
@@ -1,3 +1,18 @@
+2018-09-25  Justin Fan  
+
+WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample
+https://bugs.webkit.org/show_bug.cgi?id=189625
+
+
+Reviewed by Dean Jackson.
+
+Implement support for Primitive Restart Fixed Index as expected 
+by the WebGL 2 specifications. 
+
+* TestExpectations: Skip some flaky tests between different Mac machines under 2.0.0. 
+* webgl/webgl2-primitive-restart.html: Canary ref test to be run as part of LayoutTests suite.
+* webgl/webgl2-primitive-restart-expected.html:
+
 2018-09-25  Chris Dumez  
 
 Unreviewed, rolling out r236420 and r236458.


Modified: trunk/LayoutTests/TestExpectations (236489 => 236490)

--- trunk/LayoutTests/TestExpectations	2018-09-26 00:13:59 UTC (rev 236489)
+++ trunk/LayoutTests/TestExpectations	2018-09-26 00:24:52 UTC (rev 236490)
@@ -965,13 +965,15 @@
 
 webkit.org/b/139640 [ Debug ] webgl/1.0.2/conformance/glsl/misc/shader-uniform-packing-restrictions.html [ Slow ]
 
-webkit.org/b/189641 webgl/2.0.0/conformance/buffers/buffer-uninitialized.html [ Failure ]
-webkit.org/b/189641 webgl/2.0.0/conformance/extensions/webgl-draw-buffers.html [ Failure Slow ]
-webkit.org/b/189641 webgl/2.0.0/conformance/renderbuffers/feedback-loop.html [ Failure ] 
-webkit.org/b/189641 webgl/2.0.0/conformance/rendering/clipping-wide-points.html [ Failure ] 
-webkit.org/b/189641 webgl/2.0.0/conformance/textures/misc/copy-tex-image-2d-formats.html [ Failure ] 
-webkit.org/b/189641 webgl/2.0.0/conformance2/state/gl-object-get-calls.html [ Failure Slow ]
-webkit.org/b/189641 webgl/2.0.0/conformance2/textures/misc/tex-3d-size-limit.html [ Failure ]
+# These tests are generating inconsistent results between my machine (AMD) and test bots (INTEL)
+webkit.org/b/189641 webgl/2.0.0/conformance/buffers/buffer-uninitialized.html [ Skip ]
+webkit.org/b/189641 webgl/2.0.0/conformance/extensions/webgl-draw-buffers.html [ Skip ]
+webkit.org/b/189641 webgl/2.0.0/conformance/renderbuffers/feedback-loop.html [ Skip ] 
+webkit.org/b/189641 webgl/2.0.0/conformance/rendering/clipping-wide-points.html [ Skip ] 
+webkit.org/b/189641 webgl/2.0.0/conformance/textures/misc/copy-tex-image-2d-formats.html [ Skip ] 
+webkit.org/b/189641 webgl/2.0.0/conformance2/state/gl-object-get-calls.html [ Skip ]
+webkit.org/b/189641 webgl/2.0.0/conformance2/textures/misc/tex-3d-size-limit.html [ Skip ]
+
 webkit.org/b/189641 webgl/2.0.0/conformance2/rendering/blitframebuffer-filter-outofbounds.html [ Slow ]
 
 [ Debug ] fast/workers/worker-cloneport.html [ Slow ]


Added: trunk/LayoutTests/webgl/webgl2-primitive-restart-expected.html (0 => 236490)

--- 

[webkit-changes] [240101] trunk

2019-01-16 Thread justin_fan
Title: [240101] trunk








Revision 240101
Author justin_...@apple.com
Date 2019-01-16 17:35:01 -0800 (Wed, 16 Jan 2019)


Log Message
[WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
https://bugs.webkit.org/show_bug.cgi?id=193473

Reviewed by Dean Jackson and Myles Maxfield.

Source/WebCore:

Also, switch to using the inputSlot instead of the shaderLocation field, as this seems more correct.
As of now I cannot determine an analog for WebGPU's shaderLocation in Metal.

Test: Covered by vertex-buffer-triangle-strip.html. No change in behavior.

* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setInputStateForPipelineDescriptor): Use the inputSlot instead of shaderLocation as bufferIndex.

LayoutTests:

Refactor the vertex shader to use the vertex stage input, rather than buffer resources.

* webgpu/vertex-buffer-triangle-strip.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/vertex-buffer-triangle-strip.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (240100 => 240101)

--- trunk/LayoutTests/ChangeLog	2019-01-17 01:18:05 UTC (rev 240100)
+++ trunk/LayoutTests/ChangeLog	2019-01-17 01:35:01 UTC (rev 240101)
@@ -1,3 +1,14 @@
+2019-01-16  Justin Fan  
+
+[WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
+https://bugs.webkit.org/show_bug.cgi?id=193473
+
+Reviewed by Dean Jackson and Myles Maxfield.
+
+Refactor the vertex shader to use the vertex stage input, rather than buffer resources. 
+
+* webgpu/vertex-buffer-triangle-strip.html:
+
 2019-01-16  Chris Dumez  
 
 Regression(PSON) View becomes blank after click a cross-site download link


Modified: trunk/LayoutTests/webgpu/vertex-buffer-triangle-strip.html (240100 => 240101)

--- trunk/LayoutTests/webgpu/vertex-buffer-triangle-strip.html	2019-01-17 01:18:05 UTC (rev 240100)
+++ trunk/LayoutTests/webgpu/vertex-buffer-triangle-strip.html	2019-01-17 01:35:01 UTC (rev 240101)
@@ -12,17 +12,24 @@
 
 using namespace metal;
 
-struct Vertex
+struct VertexIn
 {
+float4 position [[attribute(0)]];
+};
+
+struct VertexOut
+{
 float4 position [[position]];
 };
 
-vertex Vertex vertex_main(const device Vertex* vertex_array [[buffer(0)]], uint vid [[vertex_id]])
+vertex VertexOut vertex_main(VertexIn vertexIn [[stage_in]])
 {
-return vertex_array[vid];
+VertexOut vOut;
+vOut.position = vertexIn.position;
+return vOut;
 }
 
-fragment float4 fragment_main(Vertex vertexIn [[stage_in]])
+fragment float4 fragment_main()
 {
 return float4(0.0, 1.0, 0.0, 1.0);
 }


Modified: trunk/Source/WebCore/ChangeLog (240100 => 240101)

--- trunk/Source/WebCore/ChangeLog	2019-01-17 01:18:05 UTC (rev 240100)
+++ trunk/Source/WebCore/ChangeLog	2019-01-17 01:35:01 UTC (rev 240101)
@@ -1,3 +1,18 @@
+2019-01-16  Justin Fan  
+
+[WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
+https://bugs.webkit.org/show_bug.cgi?id=193473
+
+Reviewed by Dean Jackson and Myles Maxfield.
+
+Also, switch to using the inputSlot instead of the shaderLocation field, as this seems more correct. 
+As of now I cannot determine an analog for WebGPU's shaderLocation in Metal. 
+
+Test: Covered by vertex-buffer-triangle-strip.html. No change in behavior.
+
+* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
+(WebCore::setInputStateForPipelineDescriptor): Use the inputSlot instead of shaderLocation as bufferIndex. 
+
 2019-01-16  Myles C. Maxfield  
 
 [WHLSL] Add the function stage checker


Modified: trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm (240100 => 240101)

--- trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm	2019-01-17 01:18:05 UTC (rev 240100)
+++ trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm	2019-01-17 01:35:01 UTC (rev 240101)
@@ -134,7 +134,7 @@
 MTLVertexAttributeDescriptor *mtlAttributeDesc = [attributeArray objectAtIndexedSubscript:i];
 mtlAttributeDesc.format = *mtlFormat;
 mtlAttributeDesc.offset = attributes[i].offset;
-mtlAttributeDesc.bufferIndex = attributes[i].shaderLocation;
+mtlAttributeDesc.bufferIndex = attributes[i].inputSlot;
 [mtlVertexDescriptor.get().attributes setObject:mtlAttributeDesc atIndexedSubscript:i];
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [240180] trunk

2019-01-18 Thread justin_fan
Title: [240180] trunk








Revision 240180
Author justin_...@apple.com
Date 2019-01-18 15:09:38 -0800 (Fri, 18 Jan 2019)


Log Message
(WIP) [WebGPU] WebGPUProgrammablePassEncoder::setBindGroup prototype
https://bugs.webkit.org/show_bug.cgi?id=193457


Reviewed by Dean Jackson.

Source/WebCore:

Enable WebGPU developers to assign buffer bind groups and access them via render pipeline.

Test: webgpu/buffer-resource-triangles.html

* Modules/webgpu/WebGPUBindGroup.h:
(WebCore::WebGPUBindGroup::bindGroup const): Added getter.
* Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
(WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Added. Delegates call to GPUProgrammablePassEncoder.
* Modules/webgpu/WebGPUProgrammablePassEncoder.h: Enable setBindGroup.
* Modules/webgpu/WebGPUProgrammablePassEncoder.idl: ditto.
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/GPUBindGroup.h:
(WebCore::GPUBindGroup::layout const): Added getter.
(WebCore::GPUBindGroup::bindings const): ditto.
* platform/graphics/gpu/GPUBindGroupLayout.h: Added ArgumentEncoderBuffer struct to retain ptr to both MTLArgumentEncoders and their argument MTLBuffers.
(WebCore::GPUBindGroupLayout::ArgumentEncoderBuffer::operator! const):
(WebCore::GPUBindGroupLayout::vertexArguments const): Added. Getter.
(WebCore::GPUBindGroupLayout::fragmentArguments const): ditto.
(WebCore::GPUBindGroupLayout::computeArguments const): ditto.
* platform/graphics/gpu/GPUDevice.cpp: Refactored unnecessary header include.
* platform/graphics/gpu/GPUDevice.h: ditto.
* platform/graphics/gpu/GPUProgrammablePassEncoder.h:
(WebCore::GPUProgrammablePassEncoder::setVertexBuffer): Added. Delegates to MTLCommandEncoder call.
(WebCore::GPUProgrammablePassEncoder::setFragmentBuffer): ditto.
* platform/graphics/gpu/GPURenderPassEncoder.h:
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
(WebCore::tryCreateArgumentEncoderAndBuffer): Replace newEncoder(). Now create an ArgumentEncoderBuffer object from an array of MTLArgumentDescriptors, if able.
(WebCore::GPUBindGroupLayout::tryCreate): Refactor to support ArgumentEncoderBuffers, and allocate MTLBuffers for argument encoders.
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout): Support ArgumentEncoderBuffers.
(WebCore::newEncoder): Deleted.
* platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
(WebCore::GPUCommandBuffer::GPUCommandBuffer):
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
(WebCore::GPUProgrammablePassEncoder::setResourceAsBufferOnEncoder): Set a buffer resource on the MTLArgumentEncoder, and call useResource on the command encoder.
(WebCore::GPUProgrammablePassEncoder::setBindGroup): Parses the bind group to assign each resource on its matching MTLArgumentEncoder.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::useResource): Resolves call from GPUProgrammablePassEncoder to call on MTLRenderCommandEncoder.
(WebCore::GPURenderPassEncoder::setVertexBuffer): ditto.
(WebCore::GPURenderPassEncoder::setFragmentBuffer): ditto.

LayoutTests:

Draw 3 triangles via WebGPU to create a green square canvas, with reference.
Each vertex is stored in its own WebGPUBuffer and they are mix/matched per bind group.
This tests multiple resource bindings in one bind group as well as setting multiple
bind groups per draw call and per command encoder.

* webgpu/buffer-resource-triangles-expected.html: Added. Reference generated using 2D canvas.
* webgpu/buffer-resource-triangles.html: Added.
1) Draw top two triangles using two bind groups in one draw call.
2) Swap first bind group and issue second draw call to draw middle triangle.
* webgpu/js/webgpu-functions.js:
(createBasicPipeline): Now handles new primitive topologies.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/js/webgpu-functions.js
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroup.h
trunk/Source/WebCore/Modules/webgpu/WebGPUProgrammablePassEncoder.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUProgrammablePassEncoder.h
trunk/Source/WebCore/Modules/webgpu/WebGPUProgrammablePassEncoder.idl
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.h
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroup.h
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h
trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h
trunk/Source/WebCore/platform/graphics/gpu/GPUProgrammablePassEncoder.h
trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassEncoder.h
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm


Added Paths


[webkit-changes] [239944] trunk

2019-01-14 Thread justin_fan
Title: [239944] trunk








Revision 239944
Author justin_...@apple.com
Date 2019-01-14 13:56:07 -0800 (Mon, 14 Jan 2019)


Log Message
[WebGPU] Map WebGPUBindGroupLayoutBindings from the BindGroupLayoutDescriptor for error checking and later referencing
https://bugs.webkit.org/show_bug.cgi?id=193405

Reviewed by Dean Jackson.

Source/WebCore:

When creating a WebGPUBindGroupLayout, cache the WebGPUBindGroupLayoutDescriptor's list of BindGroupLayoutBindings
in a HashMap, keyed by binding number, for quick reference during the WebGPUProgrammablePassEncoder::setBindGroups
implementation to follow. Also add error-checking e.g. detecting duplicate binding numbers in the same WebGPUBindGroupLayout
and non-existent binding numbers when creating the WebGPUBindGroup.

No new tests. BindGroups and BindGroupLayouts reflect the (canonical?) strategy of returning empty
objects upon creation failure and reporting errors elswhere. Since error reporting is not yet implemented,
the error checks aren't testable from LayoutTests right now. Expected behavior unchanged and covered by existing tests.

* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroup const):
Number of bindings must be consistent between bindings and layout bindings.
BindGroupBindings should only refer to existing BindGroupLayoutBindings.
* platform/graphics/gpu/GPUBindGroup.h:
* platform/graphics/gpu/GPUBindGroupLayout.h:
(WebCore::GPUBindGroupLayout::bindingsMap const): Added. Cache map of BindGroupLayoutBindings.
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Disallow duplicate binding numbers in BindGroupLayoutBindings.
(WebCore::GPUBindGroupLayout::tryCreate):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):

LayoutTests:

Small fixes that do not alter behavior.

* webgpu/bind-groups.html:
* webgpu/pipeline-layouts.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/bind-groups.html
trunk/LayoutTests/webgpu/pipeline-layouts.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroup.h
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (239943 => 239944)

--- trunk/LayoutTests/ChangeLog	2019-01-14 21:44:46 UTC (rev 239943)
+++ trunk/LayoutTests/ChangeLog	2019-01-14 21:56:07 UTC (rev 239944)
@@ -1,3 +1,15 @@
+2019-01-14  Justin Fan  
+
+[WebGPU] Map WebGPUBindGroupLayoutBindings from the BindGroupLayoutDescriptor for error checking and later referencing
+https://bugs.webkit.org/show_bug.cgi?id=193405
+
+Reviewed by Dean Jackson.
+
+Small fixes that do not alter behavior.
+
+* webgpu/bind-groups.html:
+* webgpu/pipeline-layouts.html:
+
 2019-01-14  Zalan Bujtas  
 
 [LFC][BFC] Add basic box-sizing support.


Modified: trunk/LayoutTests/webgpu/bind-groups.html (239943 => 239944)

--- trunk/LayoutTests/webgpu/bind-groups.html	2019-01-14 21:44:46 UTC (rev 239943)
+++ trunk/LayoutTests/webgpu/bind-groups.html	2019-01-14 21:56:07 UTC (rev 239944)
@@ -17,7 +17,7 @@
 type: "storageBuffer"
 };
 
-const bindGroupLayout = device.createBindGroupLayout({ bindings: [bufferLayoutBinding]});
+const bindGroupLayout = device.createBindGroupLayout({ bindings: [bufferLayoutBinding] });
 
 const buffer = device.createBuffer({ size: 16, usage: WebGPUBufferUsage.STORAGE });
 const bufferBinding = { buffer: buffer, offset: 0, size: 16 };


Modified: trunk/LayoutTests/webgpu/pipeline-layouts.html (239943 => 239944)

--- trunk/LayoutTests/webgpu/pipeline-layouts.html	2019-01-14 21:44:46 UTC (rev 239943)
+++ trunk/LayoutTests/webgpu/pipeline-layouts.html	2019-01-14 21:56:07 UTC (rev 239944)
@@ -22,7 +22,7 @@
 }, "Create a basic WebGPUBindGroupLayoutDescriptor."); 
 
 promise_test(async () => {
-const device = await window.getBasicDevice();
+const device = await getBasicDevice();
 const bindGroupLayout = device.createBindGroupLayout({ bindings: [createBindGroupLayoutBinding()] });
 assert_true(bindGroupLayout instanceof WebGPUBindGroupLayout, "createBindGroupLayout returned a WebGPUBindGroupLayout");
 


Modified: trunk/Source/WebCore/ChangeLog (239943 => 239944)

--- trunk/Source/WebCore/ChangeLog	2019-01-14 21:44:46 UTC (rev 239943)
+++ trunk/Source/WebCore/ChangeLog	2019-01-14 21:56:07 UTC (rev 239944)
@@ -1,3 +1,30 @@
+2019-01-14  Justin Fan  
+
+[WebGPU] Map WebGPUBindGroupLayoutBindings from the BindGroupLayoutDescriptor for error checking and later referencing
+https://bugs.webkit.org/show_bug.cgi?id=193405
+
+Reviewed by Dean Jackson.
+
+When creating a WebGPUBindGroupLayout, cache the WebGPUBindGroupLayoutDescriptor's list of BindGroupLayoutBindings
+in a HashMap, keyed by binding number, for quick reference during the 

[webkit-changes] [239139] trunk

2018-12-12 Thread justin_fan
Title: [239139] trunk








Revision 239139
Author justin_...@apple.com
Date 2018-12-12 17:26:32 -0800 (Wed, 12 Dec 2018)


Log Message
[WebGPU] Vertex buffers and WebGPUInputState
https://bugs.webkit.org/show_bug.cgi?id=192611

Reviewed by Dean Jackson.

Source/WebCore:

Test: webgpu/vertex-buffer-triangle-strip.html

Basic implementation of vertex buffers with Metal shading language in WebGPU. In
WebGPURenderPipelineDescriptor, refactor to match updated shader stage structure and add
WebGPUInputStateDescriptor. Also implement WebGPURenderPassEncoder::setVertexBuffers.

Add symbols and files for WebGPUIndexFormat, WebGPUInputStateDescriptor, WebGPUInputStepMode,
WebGPUVertexAttributeDescriptor, WebGPUVertexFormat, WebGPUVertexInputDescriptor:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Add and implement interfaces and dictionaries for WebGPUInputState:
* Modules/webgpu/WebGPUBuffer.cpp:
(WebCore::WebGPUBuffer::WebGPUBuffer):
* Modules/webgpu/WebGPUBuffer.h:
(WebCore::WebGPUBuffer::buffer const): Added getter for backing GPUBuffer.
* Modules/webgpu/WebGPUBufferDescriptor.h:
* Modules/webgpu/WebGPUBufferDescriptor.idl: Moving WebGPUBufferUsage out into its own IDL.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUIndexFormat.h: Added.
* Modules/webgpu/WebGPUIndexFormat.idl: Added.
* Modules/webgpu/WebGPUInputStateDescriptor.h: Added.
* Modules/webgpu/WebGPUInputStateDescriptor.idl: Added.
* Modules/webgpu/WebGPUInputStepMode.h: Added.
* Modules/webgpu/WebGPUInputStepMode.idl: Added.
* Modules/webgpu/WebGPUVertexAttributeDescriptor.h: Added.
* Modules/webgpu/WebGPUVertexAttributeDescriptor.idl: Added.
* Modules/webgpu/WebGPUVertexFormat.h: Added.
* Modules/webgpu/WebGPUVertexFormat.idl: Added.
* Modules/webgpu/WebGPUVertexInputDescriptor.h: Added.
* Modules/webgpu/WebGPUVertexInputDescriptor.idl: Added.
* platform/graphics/gpu/GPUInputStateDescriptor.h: Added.
* platform/graphics/gpu/GPURenderPassEncoder.h: Added.
* platform/graphics/gpu/GPURenderPipelineDescriptor.h: Added.
* platform/graphics/gpu/GPUVertexAttributeDescriptor.h: Added.
* platform/graphics/gpu/GPUVertexInputDescriptor.h: Added.

Refactor to support updated structure of pipeline descriptor in sketch IDL:
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::validateAndConvertPipelineStage):
(WebCore::WebGPUDevice::createRenderPipeline const):
* Modules/webgpu/WebGPUPipelineDescriptorBase.h:
* Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
* Modules/webgpu/WebGPUPipelineStageDescriptor.h:
* Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
* Modules/webgpu/WebGPURenderPipelineDescriptor.h:
* Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
* Modules/webgpu/WebGPUShaderStage.*: Removed.

Add and implement setVertexBuffers:
* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::setVertexBuffers): Added.
* Modules/webgpu/WebGPURenderPassEncoder.h:
* Modules/webgpu/WebGPURenderPassEncoder.idl:
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::setVertexBuffers):
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setInputStateForPipelineDescriptor):
(WebCore::GPURenderPipeline::create):

LayoutTests:

Added variation of simple-triangle-strip to use a vertex buffer. Refactored aforementioned
test to share code with new test.

* webgpu/js/basic-webgpu-functions.js:
(setUpPipelineDescriptor):
* webgpu/js/webgpu-functions.js: Added.
(async.getBasicDevice):
(createBasicContext):
(createBasicPipeline):
(beginBasicRenderPass):
* webgpu/render-pipelines-expected.txt:
* webgpu/render-pipelines.html:
* webgpu/simple-triangle-strip.html:
* webgpu/vertex-buffer-triangle-strip-expected.html: Added.
* webgpu/vertex-buffer-triangle-strip.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/js/basic-webgpu-functions.js
trunk/LayoutTests/webgpu/render-pipelines-expected.txt
trunk/LayoutTests/webgpu/render-pipelines.html
trunk/LayoutTests/webgpu/simple-triangle-strip.html
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.h
trunk/Source/WebCore/Modules/webgpu/WebGPUBufferDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineDescriptorBase.h
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineDescriptorBase.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.idl
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.h
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.idl
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPipelineDescriptor.h

[webkit-changes] [239288] trunk

2018-12-17 Thread justin_fan
Title: [239288] trunk








Revision 239288
Author justin_...@apple.com
Date 2018-12-17 13:34:18 -0800 (Mon, 17 Dec 2018)


Log Message
[WebGPU] Implement WebGPUBindGroupLayoutDescriptor and its supporting dictionaries
https://bugs.webkit.org/show_bug.cgi?id=192726

Reviewed by Myles C. Maxfield.

Source/WebCore:

Test: webgpu/bind-group-layouts.html
Implement the WebGPUBindGroupLayoutDescriptor struct and its sub-structs:
* Modules/streams/WebGPUBindGroupLayoutDescriptor.h: Added.
* Modules/streams/WebGPUBindGroupLayoutDescriptor.idl: Added.
* Modules/webgpu/WebGPUBindGroupLayoutBinding.h: Added.
* Modules/webgpu/WebGPUBindGroupLayoutBinding.idl: Added.
* Modules/webgpu/WebGPUShaderStageBit.h: Added.
* Modules/webgpu/WebGPUShaderStageBit.idl: Added.
* platform/graphics/gpu/GPUBindGroupLayoutBinding.h: Added.
* platform/graphics/gpu/GPUBindGroupLayoutDescriptor.h: Added.

Add the new symbols and files to the project:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Small FIXME update for later:
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::setVertexBuffers):

LayoutTests:

Add simple test to ensure a WebGPUBindGroupLayoutDescriptor can be created.

* webgpu/bind-group-layouts-expected.txt: Added.
* webgpu/bind-group-layouts.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm


Added Paths

trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt
trunk/LayoutTests/webgpu/bind-group-layouts.html
trunk/Source/WebCore/Modules/streams/WebGPUBindGroupLayoutDescriptor.h
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayoutBinding.h
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayoutBinding.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayoutDescriptor.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderStageBit.h
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderStageBit.idl
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayoutBinding.h
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayoutDescriptor.h




Diff

Modified: trunk/LayoutTests/ChangeLog (239287 => 239288)

--- trunk/LayoutTests/ChangeLog	2018-12-17 21:32:39 UTC (rev 239287)
+++ trunk/LayoutTests/ChangeLog	2018-12-17 21:34:18 UTC (rev 239288)
@@ -1,3 +1,15 @@
+2018-12-17  Justin Fan  
+
+[WebGPU] Implement WebGPUBindGroupLayoutDescriptor and its supporting dictionaries
+https://bugs.webkit.org/show_bug.cgi?id=192726
+
+Reviewed by Myles C. Maxfield.
+
+Add simple test to ensure a WebGPUBindGroupLayoutDescriptor can be created.
+
+* webgpu/bind-group-layouts-expected.txt: Added.
+* webgpu/bind-group-layouts.html: Added.
+
 2018-12-17  Zalan Bujtas  
 
 Reproducible ASSERTion failure when toggling layer borders with find-in-page up


Added: trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt (0 => 239288)

--- trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt	(rev 0)
+++ trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt	2018-12-17 21:34:18 UTC (rev 239288)
@@ -0,0 +1,3 @@
+
+PASS Create WebGPUBindGroupLayoutDescriptor. 
+


Added: trunk/LayoutTests/webgpu/bind-group-layouts.html (0 => 239288)

--- trunk/LayoutTests/webgpu/bind-group-layouts.html	(rev 0)
+++ trunk/LayoutTests/webgpu/bind-group-layouts.html	2018-12-17 21:34:18 UTC (rev 239288)
@@ -0,0 +1,25 @@
+
+
+Create WebGPUBindGroupLayoutDescriptor.
+
+
+function createBindGroupLayoutBinding() {
+return {
+binding: 0,
+visibility: WebGPUShaderStageBit.FRAGMENT | WebGPUShaderStageBit.VERTEX,
+type: "storageBuffer"
+};
+}
+
+test(() => {
+const bindGroupLayoutBinding = createBindGroupLayoutBinding();
+const bindGroupLayoutDescriptor = { bindings: [bindGroupLayoutBinding] };
+assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & WebGPUShaderStageBit.FRAGMENT, 0);
+assert_not_equals(bindGroupLayoutDescriptor.bindings[0].visibility & WebGPUShaderStageBit.VERTEX, 0);
+assert_equals(bindGroupLayoutDescriptor.bindings[0].type, "storageBuffer");
+});
+
+
+
\ No newline at end of file


Modified: trunk/Source/WebCore/CMakeLists.txt (239287 => 239288)

--- trunk/Source/WebCore/CMakeLists.txt	2018-12-17 21:32:39 UTC (rev 239287)
+++ trunk/Source/WebCore/CMakeLists.txt	2018-12-17 21:34:18 UTC (rev 239288)
@@ -458,6 +458,8 @@
 Modules/webgpu/WebGPU.idl
 Modules/webgpu/WebGPUAdapter.idl
 Modules/webgpu/WebGPUAdapterDescriptor.idl
+Modules/webgpu/WebGPUBindGroupLayoutBinding.idl
+

[webkit-changes] [239495] trunk

2018-12-20 Thread justin_fan
Title: [239495] trunk








Revision 239495
Author justin_...@apple.com
Date 2018-12-20 19:04:52 -0800 (Thu, 20 Dec 2018)


Log Message
[WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
https://bugs.webkit.org/show_bug.cgi?id=192956

Reviewed by Myles Maxfield.

No testable behavior change. Existing tests cover possible crashing.

Add GPUBindGroupLayoutMetal.mm:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:

Flesh out GPUBindGroupLayout::create:
* platform/graphics/gpu/GPUBindGroupLayout.cpp:
* platform/graphics/gpu/GPUBindGroupLayout.h:
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::createBindGroupLayout const):
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
(WebCore::appendArgumentToArrayInMap): Added.
(WebCore::GPUBindGroupLayout::create):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
(WebCore::MTLDataTypeForBindingType): Added.

Modified Paths

trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/SourcesCocoa.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h
trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig
trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig


Added Paths

trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm




Diff

Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (239494 => 239495)

--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2018-12-21 02:57:27 UTC (rev 239494)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2018-12-21 03:04:52 UTC (rev 239495)
@@ -373,10 +373,12 @@
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
 ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(WK_PLATFORM_NAME));
-ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_iphoneos = $(ENABLE_WEBGPU$(WK_IOS_1100));
+ENABLE_WEBGPU_IOS_SINCE_1100 = ENABLE_WEBGPU;
 ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
 ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = $(ENABLE_WEBGPU$(WK_MACOS_1013));
+ENABLE_WEBGPU_MACOS_SINCE_1013 = ENABLE_WEBGPU;
 
 ENABLE_WEBMETAL = $(ENABLE_WEBMETAL_$(WK_PLATFORM_NAME));
 ENABLE_WEBMETAL_iphoneos = ENABLE_WEBMETAL;


Modified: trunk/Source/WebCore/ChangeLog (239494 => 239495)

--- trunk/Source/WebCore/ChangeLog	2018-12-21 02:57:27 UTC (rev 239494)
+++ trunk/Source/WebCore/ChangeLog	2018-12-21 03:04:52 UTC (rev 239495)
@@ -1,3 +1,27 @@
+2018-12-20  Justin Fan  
+
+[WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
+https://bugs.webkit.org/show_bug.cgi?id=192956
+
+Reviewed by Myles Maxfield.
+
+No testable behavior change. Existing tests cover possible crashing.
+
+Add GPUBindGroupLayoutMetal.mm:
+* SourcesCocoa.txt:
+* WebCore.xcodeproj/project.pbxproj:
+
+Flesh out GPUBindGroupLayout::create:
+* platform/graphics/gpu/GPUBindGroupLayout.cpp:
+* platform/graphics/gpu/GPUBindGroupLayout.h:
+* platform/graphics/gpu/GPUDevice.cpp:
+(WebCore::GPUDevice::createBindGroupLayout const):
+* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
+(WebCore::appendArgumentToArrayInMap): Added.
+(WebCore::GPUBindGroupLayout::create):
+(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
+(WebCore::MTLDataTypeForBindingType): Added.
+
 2018-12-20  Michael Catanzaro  
 
 Unreviewed, remove stray #pragma once added to .cpp file


Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (239494 => 239495)

--- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2018-12-21 02:57:27 UTC (rev 239494)
+++ trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2018-12-21 03:04:52 UTC (rev 239495)
@@ -373,10 +373,12 @@
 ENABLE_WEBGL2 = ENABLE_WEBGL2;
 
 ENABLE_WEBGPU = $(ENABLE_WEBGPU_$(WK_PLATFORM_NAME));
-ENABLE_WEBGPU_iphoneos = ENABLE_WEBGPU;
+ENABLE_WEBGPU_iphoneos = $(ENABLE_WEBGPU$(WK_IOS_1100));
+ENABLE_WEBGPU_IOS_SINCE_1100 = ENABLE_WEBGPU;
 ENABLE_WEBGPU_watchos = ENABLE_WEBGPU;
 ENABLE_WEBGPU_appletvos = ENABLE_WEBGPU;
-ENABLE_WEBGPU_macosx = ENABLE_WEBGPU;
+ENABLE_WEBGPU_macosx = $(ENABLE_WEBGPU$(WK_MACOS_1013));
+ENABLE_WEBGPU_MACOS_SINCE_1013 = ENABLE_WEBGPU;
 
 ENABLE_WEBMETAL = $(ENABLE_WEBMETAL_$(WK_PLATFORM_NAME));
 ENABLE_WEBMETAL_iphoneos = ENABLE_WEBMETAL;


Modified: trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig (239494 => 239495)

--- trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig	2018-12-21 02:57:27 UTC (rev 239494)
+++ 

[webkit-changes] [239515] trunk/Source/WebCore

2018-12-21 Thread justin_fan
Title: [239515] trunk/Source/WebCore








Revision 239515
Author justin_...@apple.com
Date 2018-12-21 12:46:03 -0800 (Fri, 21 Dec 2018)


Log Message
[WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
https://bugs.webkit.org/show_bug.cgi?id=192990

Reviewed by Myles C. Maxfield.

Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.

No new tests; no change in behavior.

* Modules/webgpu/WebGPUBindGroupLayout.cpp:
(WebCore::WebGPUBindGroupLayout::create):
(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
* Modules/webgpu/WebGPUBindGroupLayout.h:
(WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroupLayout const):
* platform/graphics/gpu/GPUBindGroupLayout.h:
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr.
(WebCore::GPUDevice::createBindGroupLayout const): Deleted.
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
(WebCore::appendArgumentToArray):
(WebCore::newEncoder):
(WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
(WebCore::appendArgumentToArrayInMap): Deleted.
(WebCore::GPUBindGroupLayout::create): Deleted.

Deleted unneeded GPUBindGroupLayout.cpp:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h
trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm


Removed Paths

trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (239514 => 239515)

--- trunk/Source/WebCore/ChangeLog	2018-12-21 20:25:23 UTC (rev 239514)
+++ trunk/Source/WebCore/ChangeLog	2018-12-21 20:46:03 UTC (rev 239515)
@@ -1,3 +1,40 @@
+2018-12-21  Justin Fan  
+
+[WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
+https://bugs.webkit.org/show_bug.cgi?id=192990
+
+Reviewed by Myles C. Maxfield.
+
+Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
+Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.
+
+No new tests; no change in behavior.
+
+* Modules/webgpu/WebGPUBindGroupLayout.cpp:
+(WebCore::WebGPUBindGroupLayout::create):
+(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
+* Modules/webgpu/WebGPUBindGroupLayout.h:
+(WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
+* Modules/webgpu/WebGPUDevice.cpp:
+(WebCore::WebGPUDevice::createBindGroupLayout const):
+* platform/graphics/gpu/GPUBindGroupLayout.h:
+* platform/graphics/gpu/GPUDevice.cpp:
+(WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr. 
+(WebCore::GPUDevice::createBindGroupLayout const): Deleted.
+* platform/graphics/gpu/GPUDevice.h:
+* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
+(WebCore::appendArgumentToArray):
+(WebCore::newEncoder):
+(WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
+(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
+(WebCore::appendArgumentToArrayInMap): Deleted.
+(WebCore::GPUBindGroupLayout::create): Deleted.
+
+Deleted unneeded GPUBindGroupLayout.cpp:
+* Sources.txt:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.
+
 2018-12-21  Alejandro G. Castro  
 
 [GTK][WPE] Add DeviceIdHashSaltStorage disk persistence


Modified: trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp (239514 => 239515)

--- trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp	2018-12-21 20:25:23 UTC (rev 239514)
+++ trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp	2018-12-21 20:46:03 UTC (rev 239515)
@@ -30,12 +30,12 @@
 
 namespace WebCore {
 
-Ref WebGPUBindGroupLayout::create(Ref&& layout)
+Ref WebGPUBindGroupLayout::create(RefPtr&& layout)
 {
 return adoptRef(*new WebGPUBindGroupLayout(WTFMove(layout)));
 }
 

[webkit-changes] [239094] trunk

2018-12-11 Thread justin_fan
Title: [239094] trunk








Revision 239094
Author justin_...@apple.com
Date 2018-12-11 17:40:06 -0800 (Tue, 11 Dec 2018)


Log Message
Source/WebCore:
[WebGPU] Implement WebGPUBuffer, and some nullibility consistency in WebGPU
https://bugs.webkit.org/show_bug.cgi?id=192516

Reviewed by Dean Jackson.

Test: webgpu/buffers.html

Enable basic creation of WebGPUBuffers, and fix nullability inconsitencies in WebGPU implementation.

Add necessary symbols and files for Web/GPUBuffer, Web/GPUBufferUsage, and Web/GPUBufferDescriptor:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

* Modules/webgpu/WebGPUBuffer.cpp: Added.
(WebCore::WebGPUBuffer::create):
(WebCore::WebGPUBuffer::WebGPUBuffer):
* Modules/webgpu/WebGPUBuffer.h: Added.
(WebCore::WebGPUBuffer::mapping const):
(WebCore::WebGPUBuffer::unmap): Unimplemented stub, for now, as Metal equivalent is unclear.
(WebCore::WebGPUBuffer::destroy): Unimplemented stub.
* Modules/webgpu/WebGPUBuffer.idl: Added.
* Modules/webgpu/WebGPUBufferDescriptor.h: Added.
* Modules/webgpu/WebGPUBufferDescriptor.idl: Added.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBuffer const): Added.
* platform/graphics/gpu/GPUBuffer.h:
(WebCore::GPUBuffer::platformBuffer const):
(WebCore::GPUBuffer::mapping const):
* platform/graphics/gpu/GPUBufferDescriptor.h: Added.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::createBuffer const): Added.
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/cocoa/GPUBufferMetal.mm: Added.
(WebCore::GPUBuffer::create): Attempt to create a page-aligned Gigacage to back the GPUBuffer's ArrayBuffer.
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::~GPUBuffer): Dereference mapped ArrayBuffer first.

Small benign edits, most to make nullability more consistent in WebGPU classes:
* Modules/webgpu/WebGPUCommandBuffer.cpp:
(WebCore::WebGPUCommandBuffer::create):
(WebCore::WebGPUCommandBuffer::beginRenderPass):
* Modules/webgpu/WebGPUCommandBuffer.h:
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::create):
(WebCore::WebGPUDevice::WebGPUDevice):
(WebCore::WebGPUDevice::createShaderModule const):
(WebCore::WebGPUDevice::createRenderPipeline const):
(WebCore::WebGPUDevice::createCommandBuffer const):
* Modules/webgpu/WebGPUDevice.h:
(WebCore::WebGPUDevice::device const):
* Modules/webgpu/WebGPUDevice.idl:
* Modules/webgpu/WebGPUQueue.cpp:
(WebCore::WebGPUQueue::create):
* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::create):
* Modules/webgpu/WebGPURenderPassEncoder.h:
* Modules/webgpu/WebGPUShaderModule.cpp:
(WebCore::WebGPUShaderModule::create):
(WebCore::WebGPUShaderModule::WebGPUShaderModule):
* Modules/webgpu/WebGPUShaderModule.h:
(WebCore::WebGPUShaderModule::module const):
* Modules/webgpu/WebGPUSwapChain.idl: Sync with IDL changes.
* Modules/webgpu/WebGPUTexture.cpp:
(WebCore::WebGPUTexture::create):
(WebCore::WebGPUTexture::createDefaultTextureView):
* Modules/webgpu/WebGPUTextureView.cpp:
(WebCore::WebGPUTextureView::create):
* Modules/webgpu/WebGPUTextureView.h:
* platform/graphics/gpu/cocoa/GPUQueueMetal.mm:
(WebCore::GPUQueue::create):
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::GPURenderPipeline::create):
* platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
(WebCore::GPUShaderModule::create):
* platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
(WebCore::GPUSwapChain::setDevice):
* platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
(WebCore::GPUTexture::GPUTexture):

LayoutTests:
[WebGPU] Implement WebGPUBuffer
https://bugs.webkit.org/show_bug.cgi?id=192516

Reviewed by Dean Jackson.

Basic test to create a WebGPUBuffer and ensure that its memory is valid.

* webgpu/buffers-expected.txt: Added.
* webgpu/buffers.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUCommandBuffer.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUQueue.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.h
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModule.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUShaderModule.h
trunk/Source/WebCore/Modules/webgpu/WebGPUSwapChain.idl
trunk/Source/WebCore/Modules/webgpu/WebGPUTexture.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUTextureView.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUTextureView.h
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/SourcesCocoa.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h

[webkit-changes] [239351] trunk

2018-12-18 Thread justin_fan
Title: [239351] trunk








Revision 239351
Author justin_...@apple.com
Date 2018-12-18 13:51:56 -0800 (Tue, 18 Dec 2018)


Log Message
[WebGPU] BindGroupLayout and Device::createBindGroupLayout
https://bugs.webkit.org/show_bug.cgi?id=192817

Reviewed by Dean Jackson.

Update bind-group-layouts to test new functionality.

Source/WebCore:

Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
* Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
(WebCore::WebGPUBindGroupLayout::create):
(WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
* Modules/webgpu/WebGPUBindGroupLayout.h: Added.
* Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroupLayout const): Added.
* Modules/webgpu/WebGPUDevice.h:
* Modules/webgpu/WebGPUDevice.idl:
* platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
(WebCore::GPUBindGroupLayout::tryCreate):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
* platform/graphics/gpu/GPUBindGroupLayout.h: Added.
* platform/graphics/gpu/GPUDevice.cpp:
(WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
* platform/graphics/gpu/GPUDevice.h:

Add files and symbols to project:
* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:

Missing includes that were previously provided via UnifiedSources:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/sql/SQLiteFileSystem.h:

LayoutTests:

* webgpu/bind-group-layouts-expected.txt:
* webgpu/bind-group-layouts.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt
trunk/LayoutTests/webgpu/bind-group-layouts.html
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/DerivedSources.make
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.h
trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h
trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h
trunk/Source/WebCore/platform/sql/SQLiteFileSystem.h


Added Paths

trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.h
trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp
trunk/Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.h




Diff

Modified: trunk/LayoutTests/ChangeLog (239350 => 239351)

--- trunk/LayoutTests/ChangeLog	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/LayoutTests/ChangeLog	2018-12-18 21:51:56 UTC (rev 239351)
@@ -1,3 +1,15 @@
+2018-12-18  Justin Fan  
+
+[WebGPU] BindGroupLayout and Device::createBindGroupLayout
+https://bugs.webkit.org/show_bug.cgi?id=192817
+
+Reviewed by Dean Jackson.
+
+Update bind-group-layouts to test new functionality.
+
+* webgpu/bind-group-layouts-expected.txt:
+* webgpu/bind-group-layouts.html:
+
 2018-12-18  Ryan Haddad  
 
 Unreviewed test gardening after r239306 and r239338.


Modified: trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt (239350 => 239351)

--- trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/LayoutTests/webgpu/bind-group-layouts-expected.txt	2018-12-18 21:51:56 UTC (rev 239351)
@@ -1,3 +1,4 @@
 
-PASS Create WebGPUBindGroupLayoutDescriptor. 
+PASS Create a basic WebGPUBindGroupLayoutDescriptor. 
+PASS Create a basic WebGPUBindGroupLayout with a WebGPUDevice. 
 


Modified: trunk/LayoutTests/webgpu/bind-group-layouts.html (239350 => 239351)

--- trunk/LayoutTests/webgpu/bind-group-layouts.html	2018-12-18 21:51:06 UTC (rev 239350)
+++ trunk/LayoutTests/webgpu/bind-group-layouts.html	2018-12-18 21:51:56 UTC (rev 239351)
@@ -1,7 +1,8 @@
 
 
-Create WebGPUBindGroupLayoutDescriptor.
+Create WebGPUBindGroupLayout.
 
+