Bug 169219 - Add GPUDevice implementation and WebGPULayer
Summary: Add GPUDevice implementation and WebGPULayer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks: 167952
  Show dependency treegraph
 
Reported: 2017-03-06 14:28 PST by Dean Jackson
Modified: 2017-03-09 13:33 PST (History)
5 users (show)

See Also:


Attachments
Patch (23.15 KB, patch)
2017-03-06 14:32 PST, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (23.27 KB, patch)
2017-03-07 04:09 PST, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (25.47 KB, patch)
2017-03-07 04:38 PST, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (33.88 KB, patch)
2017-03-07 13:01 PST, Dean Jackson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2017-03-06 14:28:43 PST
Foundation of the WebGPU implementation.
Comment 1 Radar WebKit Bug Importer 2017-03-06 14:28:56 PST
<rdar://problem/30879048>
Comment 2 Dean Jackson 2017-03-06 14:32:05 PST
Created attachment 303559 [details]
Patch
Comment 3 Dean Jackson 2017-03-06 14:32:34 PST
Not for review - just EWS. Writing API tests.
Comment 4 Dean Jackson 2017-03-07 04:09:06 PST
Created attachment 303640 [details]
Patch
Comment 5 Dean Jackson 2017-03-07 04:38:07 PST
Created attachment 303644 [details]
Patch
Comment 6 Dean Jackson 2017-03-07 13:01:45 PST
Created attachment 303706 [details]
Patch
Comment 7 Sam Weinig 2017-03-07 13:26:07 PST
Comment on attachment 303706 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303706&action=review

> Source/WebCore/platform/graphics/cocoa/GPUDeviceMetal.mm:55
> +#ifndef NDEBUG
> +    [m_layer setName:@"WebGPU Layer"];
> +#endif

Do we really need to make these debug only still?

> Source/WebCore/platform/graphics/cocoa/WebGPULayer.h:33
> +#import <Metal/Metal.h>
> +#import <QuartzCore/QuartzCore.h>
> +
> +namespace WebCore {
> +class GPUDevice;
> +}

This file is not guarded by #if ENABLE(WEBGPU). Should it be?

> Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm:35
> +
> +#import "GPUDevice.h"
> +#import "GraphicsContextCG.h"
> +#import "GraphicsLayer.h"
> +#import <wtf/FastMalloc.h>
> +#import <wtf/RetainPtr.h>
> +
> +using namespace WebCore;

This file is not guarded by #if ENABLE(WEBGPU). Should it be?

> Source/WebCore/platform/graphics/gpu/GPUDevice.cpp:32
> +#import "Logging.h"
> +
> +#if ENABLE(WEBGPU)
> +

When guarded like this, we usually put all the #includes/#imports below the main one, inside the guard.

> Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm:33
> +#include "config.h"
> +#import "Test.h"
> +#import <Metal/Metal.h>
> +#import <WebCore/GPUDevice.h>
> +
> +using namespace WebCore;
> +
> +namespace TestWebKitAPI {

This file is not guarded by #if ENABLE(WEBGPU). Should it be?
Comment 8 Dean Jackson 2017-03-07 14:28:34 PST
Committed r213541: <http://trac.webkit.org/changeset/213541>