Bug 194409 - [Web GPU] GPUDevice::createTexture implementation prototype
Summary: [Web GPU] GPUDevice::createTexture implementation prototype
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-07 13:03 PST by Justin Fan
Modified: 2019-02-07 18:01 PST (History)
9 users (show)

See Also:


Attachments
Patch (29.89 KB, patch)
2019-02-07 13:20 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (29.95 KB, patch)
2019-02-07 13:40 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (30.01 KB, patch)
2019-02-07 14:10 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch for landing (30.03 KB, patch)
2019-02-07 17:32 PST, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.