Skip to content

Commit b66f1b4

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 2f51cb4 commit b66f1b4

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
@@ -5869,18 +5869,6 @@ const
58695869
ffi
58705870
:
58715871
:
5872-
WGPUImageCopyBuffer
5873-
bufView
5874-
=
5875-
{
5876-
bufferId
5877-
bufLayout
5878-
}
5879-
;
5880-
const
5881-
ffi
5882-
:
5883-
:
58845872
WGPUExtent3d
58855873
extent
58865874
=
@@ -5919,8 +5907,9 @@ get
59195907
aCommandEncoderId
59205908
&
59215909
texView
5910+
bufferId
59225911
&
5923-
bufView
5912+
bufLayout
59245913
&
59255914
extent
59265915
)

gfx/wgpu_bindings/src/server.rs

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,16 +4351,22 @@ command
43514351
:
43524352
:
43534353
ImageCopyTexture
4354-
destination
4354+
dst_buffer
43554355
:
4356-
&
43574356
wgc
43584357
:
43594358
:
4360-
command
4359+
id
43614360
:
43624361
:
4363-
ImageCopyBuffer
4362+
BufferId
4363+
dst_layout
4364+
:
4365+
&
4366+
crate
4367+
:
4368+
:
4369+
ImageDataLayout
43644370
size
43654371
:
43664372
&
@@ -4370,6 +4376,29 @@ wgt
43704376
Extent3d
43714377
)
43724378
{
4379+
let
4380+
destination
4381+
=
4382+
wgc
4383+
:
4384+
:
4385+
command
4386+
:
4387+
:
4388+
ImageCopyBuffer
4389+
{
4390+
buffer
4391+
:
4392+
dst_buffer
4393+
layout
4394+
:
4395+
dst_layout
4396+
.
4397+
into_wgt
4398+
(
4399+
)
4400+
}
4401+
;
43734402
gfx_select
43744403
!
43754404
(
@@ -4382,6 +4411,7 @@ command_encoder_copy_texture_to_buffer
43824411
(
43834412
self_id
43844413
source
4414+
&
43854415
destination
43864416
size
43874417
)

0 commit comments

Comments
 (0)