Skip to content

Commit 9496aa5

Browse files
committed
Bug 1829305: fix(webgpu): trade incorrect ImageCopyBuffer usage for exploded ID and FFI-friendly ImageDataLayout in wgpu_server_encoder_copy_texture_to_buffer r=webgpu-reviewers,jimb
Differential Revision: https://phabricator.services.mozilla.com/D176207 UltraBlame original commit: 40f7492787a9f27938eeffda38d9d77a81164f3b
1 parent 3a2dba2 commit 9496aa5

File tree

2 files changed

+36
-17
lines changed

2 files changed

+36
-17
lines changed

dom/webgpu/ipc/WebGPUParent.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6390,18 +6390,6 @@ const
63906390
ffi
63916391
:
63926392
:
6393-
WGPUImageCopyBuffer
6394-
bufView
6395-
=
6396-
{
6397-
bufferId
6398-
bufLayout
6399-
}
6400-
;
6401-
const
6402-
ffi
6403-
:
6404-
:
64056393
WGPUExtent3d
64066394
extent
64076395
=
@@ -6440,8 +6428,9 @@ get
64406428
aCommandEncoderId
64416429
&
64426430
texView
6431+
bufferId
64436432
&
6444-
bufView
6433+
bufLayout
64456434
&
64466435
extent
64476436
)

gfx/wgpu_bindings/src/server.rs

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5247,16 +5247,22 @@ command
52475247
:
52485248
:
52495249
ImageCopyTexture
5250-
destination
5250+
dst_buffer
52515251
:
5252-
&
52535252
wgc
52545253
:
52555254
:
5256-
command
5255+
id
52575256
:
52585257
:
5259-
ImageCopyBuffer
5258+
BufferId
5259+
dst_layout
5260+
:
5261+
&
5262+
crate
5263+
:
5264+
:
5265+
ImageDataLayout
52605266
size
52615267
:
52625268
&
@@ -5266,6 +5272,29 @@ wgt
52665272
Extent3d
52675273
)
52685274
{
5275+
let
5276+
destination
5277+
=
5278+
wgc
5279+
:
5280+
:
5281+
command
5282+
:
5283+
:
5284+
ImageCopyBuffer
5285+
{
5286+
buffer
5287+
:
5288+
dst_buffer
5289+
layout
5290+
:
5291+
dst_layout
5292+
.
5293+
into_wgt
5294+
(
5295+
)
5296+
}
5297+
;
52695298
gfx_select
52705299
!
52715300
(
@@ -5278,6 +5307,7 @@ command_encoder_copy_texture_to_buffer
52785307
(
52795308
self_id
52805309
source
5310+
&
52815311
destination
52825312
size
52835313
)

0 commit comments

Comments
 (0)