@@ -18,7 +18,7 @@ pub trait GlobalPlay {
18
18
fn encode_commands (
19
19
& self ,
20
20
encoder : wgc:: id:: CommandEncoderId ,
21
- commands : Vec < Command > ,
21
+ commands : Vec < Command < IdReferences > > ,
22
22
command_buffer_id_manager : & mut IdentityManager < wgc:: id:: markers:: CommandBuffer > ,
23
23
) -> wgc:: id:: CommandBufferId ;
24
24
fn process (
@@ -36,7 +36,7 @@ impl GlobalPlay for wgc::global::Global {
36
36
fn encode_commands (
37
37
& self ,
38
38
encoder : wgc:: id:: CommandEncoderId ,
39
- commands : Vec < Command > ,
39
+ commands : Vec < Command < IdReferences > > ,
40
40
command_buffer_id_manager : & mut IdentityManager < wgc:: id:: markers:: CommandBuffer > ,
41
41
) -> wgc:: id:: CommandBufferId {
42
42
for command in commands {
@@ -71,21 +71,21 @@ impl GlobalPlay for wgc::global::Global {
71
71
. command_encoder_clear_texture ( encoder, dst, & subresource_range)
72
72
. unwrap ( ) ,
73
73
Command :: WriteTimestamp {
74
- query_set_id ,
74
+ query_set ,
75
75
query_index,
76
76
} => self
77
- . command_encoder_write_timestamp ( encoder, query_set_id , query_index)
77
+ . command_encoder_write_timestamp ( encoder, query_set , query_index)
78
78
. unwrap ( ) ,
79
79
Command :: ResolveQuerySet {
80
- query_set_id ,
80
+ query_set ,
81
81
start_query,
82
82
query_count,
83
83
destination,
84
84
destination_offset,
85
85
} => self
86
86
. command_encoder_resolve_query_set (
87
87
encoder,
88
- query_set_id ,
88
+ query_set ,
89
89
start_query,
90
90
query_count,
91
91
destination,
@@ -100,29 +100,29 @@ impl GlobalPlay for wgc::global::Global {
100
100
. command_encoder_insert_debug_marker ( encoder, & marker)
101
101
. unwrap ( ) ,
102
102
Command :: RunComputePass {
103
- base ,
103
+ pass ,
104
104
timestamp_writes,
105
105
} => {
106
106
self . compute_pass_end_with_unresolved_commands (
107
107
encoder,
108
- base ,
108
+ pass ,
109
109
timestamp_writes. as_ref ( ) ,
110
110
) ;
111
111
}
112
112
Command :: RunRenderPass {
113
- base ,
114
- target_colors ,
115
- target_depth_stencil ,
113
+ pass ,
114
+ color_attachments ,
115
+ depth_stencil_attachment ,
116
116
timestamp_writes,
117
- occlusion_query_set_id ,
117
+ occlusion_query_set ,
118
118
} => {
119
119
self . render_pass_end_with_unresolved_commands (
120
120
encoder,
121
- base ,
122
- & target_colors ,
123
- target_depth_stencil . as_ref ( ) ,
121
+ pass ,
122
+ & color_attachments ,
123
+ depth_stencil_attachment . as_ref ( ) ,
124
124
timestamp_writes. as_ref ( ) ,
125
- occlusion_query_set_id ,
125
+ occlusion_query_set ,
126
126
) ;
127
127
}
128
128
Command :: BuildAccelerationStructures { blas, tlas } => {
@@ -175,6 +175,7 @@ impl GlobalPlay for wgc::global::Global {
175
175
)
176
176
. unwrap ( ) ;
177
177
}
178
+ Command :: TransitionResources { .. } => unimplemented ! ( "not supported in a trace" ) ,
178
179
}
179
180
}
180
181
let ( cmd_buf, error) = self . command_encoder_finish (
@@ -233,12 +234,8 @@ impl GlobalPlay for wgc::global::Global {
233
234
Action :: DestroyTexture ( id) => {
234
235
self . texture_drop ( id) ;
235
236
}
236
- Action :: CreateTextureView {
237
- id,
238
- parent_id,
239
- desc,
240
- } => {
241
- let ( _, error) = self . texture_create_view ( parent_id, & desc, Some ( id) ) ;
237
+ Action :: CreateTextureView { id, parent, desc } => {
238
+ let ( _, error) = self . texture_create_view ( parent, & desc, Some ( id) ) ;
242
239
if let Some ( e) = error {
243
240
panic ! ( "{e}" ) ;
244
241
}
@@ -268,8 +265,8 @@ impl GlobalPlay for wgc::global::Global {
268
265
Action :: DestroySampler ( id) => {
269
266
self . sampler_drop ( id) ;
270
267
}
271
- Action :: GetSurfaceTexture { id, parent_id } => {
272
- self . surface_get_current_texture ( parent_id , Some ( id) )
268
+ Action :: GetSurfaceTexture { id, parent } => {
269
+ self . surface_get_current_texture ( parent , Some ( id) )
273
270
. unwrap ( )
274
271
. texture
275
272
. unwrap ( ) ;
0 commit comments