Bug 211303 - WebGPU: copyTextureToTexture() has an implementation bug (src copy view info is used also as dst)
Summary: WebGPU: copyTextureToTexture() has an implementation bug (src copy view info ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: gvinals
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-01 10:44 PDT by gvinals
Modified: 2020-05-04 11:00 PDT (History)
8 users (show)

See Also:


Attachments
Patch (10.70 KB, patch)
2020-05-02 18:49 PDT, gvinals
dbates: review+
Details | Formatted Diff | Diff
Patch for committing (10.77 KB, patch)
2020-05-04 10:13 PDT, gvinals
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gvinals 2020-05-01 10:44:35 PDT
Summary:
WebGPU: copyTextureToTexture() has an implementation bug (src copy view info is used also as dst).

See:
GPUCommandBufferMetal.mm#214,217

[blitEncoder()
        copyFromTexture:src.texture->platformTexture()
        sourceSlice:src.arrayLayer
        sourceLevel:src.mipLevel
        sourceOrigin:MTLOriginMake(src.origin.x, src.origin.y, src.origin.z)
        sourceSize:MTLSizeMake(size.width, size.height, size.depth)
        toTexture:dst.texture->platformTexture()
        destinationSlice:src.arrayLayer
        destinationLevel:src.mipLevel
        destinationOrigin:MTLOriginMake(dst.origin.x, dst.origin.y, dst.origin.z)];

In particular:
        destinationSlice:src.arrayLayer
        destinationLevel:src.mipLevel

Should be:
        destinationSlice:dst.arrayLayer
        destinationLevel:dst.mipLevel
Comment 1 gvinals 2020-05-01 10:47:04 PDT
<rdar://problem/62266037>
Comment 2 gvinals 2020-05-02 18:49:05 PDT
Created attachment 398302 [details]
Patch
Comment 3 Daniel Bates 2020-05-03 12:14:48 PDT
Comment on attachment 398302 [details]
Patch

Patch looks good.
Comment 4 gvinals 2020-05-04 10:13:41 PDT
Created attachment 398385 [details]
Patch for committing
Comment 5 EWS 2020-05-04 10:14:51 PDT
gvinals@apple.com does not have committer permissions according to https://trac.webkit.org/browser/webkit/trunk/Tools/Scripts/webkitpy/common/config/contributors.json.

Rejecting attachment 398385 [details] from commit queue.
Comment 6 EWS 2020-05-04 11:00:46 PDT
Committed r261089: <https://trac.webkit.org/changeset/261089>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398385 [details].