Bug 211303

Summary: WebGPU: copyTextureToTexture() has an implementation bug (src copy view info is used also as dst)
Product: WebKit Reporter: gvinals
Component: WebGPUAssignee: gvinals
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, dino, ews-watchlist, graouts, justin_fan, kondapallykalyan, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
dbates: review+
Patch for committing none

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].