Bug 194409

Summary: [Web GPU] GPUDevice::createTexture implementation prototype
Product: WebKit Reporter: Justin Fan <justin_fan>
Component: WebGPUAssignee: Justin Fan <justin_fan>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dino, esprehn+autocc, ews-watchlist, graouts, kondapallykalyan, mmaxfield, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Justin Fan 2019-02-07 13:03:19 PST
[Web GPU] GPUDevice::createTexture implementation prototype
Comment 1 Radar WebKit Bug Importer 2019-02-07 13:03:59 PST
<rdar://problem/47894312>
Comment 2 Justin Fan 2019-02-07 13:20:14 PST
Created attachment 361432 [details]
Patch
Comment 3 Justin Fan 2019-02-07 13:40:17 PST
Created attachment 361438 [details]
Patch
Comment 4 Justin Fan 2019-02-07 14:10:38 PST
Created attachment 361441 [details]
Patch
Comment 5 Dean Jackson 2019-02-07 16:38:29 PST
Comment on attachment 361441 [details]
Patch

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

> Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm:66
> +        if (usage & MTLTextureUsageShaderWrite)

I'm not sure if we should be testing for the MTL form or the GPUTextureUsage::Storage flag. I think the latter makes more sense.

> Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm:75
> +    return usage;

Should it be an error (nullopt) to return unknown?

> Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm:110
> +    auto usage = mtlTextureUsageForGPUTextureUsageFlags(descriptor.usage);
> +    if (!usage) {

Yeah, so here.... if we're usage type unknown, should we error?

> Source/WebCore/platform/graphics/gpu/cocoa/GPUTextureMetal.mm:111
> +        LOG(WebGPU, "%s: Invalid GPUTextureUsageFlags!");

You forgot functionName. Surprised it compiled.
Comment 6 Justin Fan 2019-02-07 17:32:28 PST
Created attachment 361474 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2019-02-07 18:00:55 PST
The commit-queue encountered the following flaky tests while processing attachment 361474 [details]:

media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html bug 193587 (author: graouts@apple.com)
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2019-02-07 18:01:45 PST
Comment on attachment 361474 [details]
Patch for landing

Clearing flags on attachment: 361474

Committed r241181: <https://trac.webkit.org/changeset/241181>
Comment 9 WebKit Commit Bot 2019-02-07 18:01:47 PST
All reviewed patches have been landed.  Closing bug.