@@ -432,14 +432,8 @@ static inline gpu_draw_command gpu_draw_command_make(uint32_t data_index, uint8_
432432 enum primitive_fillmode fillmode , enum command_type type )
433433{
434434 gpu_draw_command cmd ;
435-
436435 cmd .data_index = data_index ;
437- cmd .flags =
438- (uint32_t )extra
439- | ((uint32_t )clip_index << 8 )
440- | ((uint32_t )fillmode << 16 )
441- | ((uint32_t )type << 24 );
442-
436+ cmd .flags = (uint32_t )extra | ((uint32_t )clip_index << 8 ) | ((uint32_t )fillmode << 16 ) | ((uint32_t )type << 24 );
443437 return cmd ;
444438}
445439
@@ -478,7 +472,7 @@ static inline void merge_quantized_aabb(quantized_aabb* merge, const quantized_a
478472 uint32_t m = * merge ;
479473 uint32_t o = * other ;
480474
481- uint32_t min_x = OD_MIN (m & 0xFFu , o & 0xFFu );
475+ uint32_t min_x = OD_MIN (m & 0xFFu , o & 0xFFu );
482476 uint32_t min_y = OD_MIN ((m >> 8 ) & 0xFFu , (o >> 8 ) & 0xFFu );
483477 uint32_t max_x = OD_MAX ((m >> 16 ) & 0xFFu , (o >> 16 ) & 0xFFu );
484478 uint32_t max_y = OD_MAX ((m >> 24 ) & 0xFFu , (o >> 24 ) & 0xFFu );
@@ -1308,6 +1302,7 @@ void od_end_frame(struct onedraw* r, WGPUTextureView target_view)
13081302 dynamic_buffer_upload (r -> queue , & r -> commands .colors , buffer_index );
13091303 dynamic_buffer_upload (r -> queue , & r -> commands .float_data , buffer_index );
13101304 dynamic_buffer_upload (r -> queue , & r -> commands .draw_args , buffer_index );
1305+ dynamic_buffer_upload (r -> queue , & r -> commands .list , buffer_index );
13111306
13121307 WGPUCommandEncoderDescriptor encoder_desc = {0 };
13131308 WGPUCommandEncoder encoder = wgpuDeviceCreateCommandEncoder (r -> device , & encoder_desc );
@@ -1317,7 +1312,8 @@ void od_end_frame(struct onedraw* r, WGPUTextureView target_view)
13171312
13181313 // clear heads pass
13191314 {
1320- WGPUComputePassEncoder pass = wgpuCommandEncoderBeginComputePass (encoder , NULL );
1315+ WGPUComputePassDescriptor desc = {.label = WGPU_STRING_VIEW ("clear_heads pass" )};
1316+ WGPUComputePassEncoder pass = wgpuCommandEncoderBeginComputePass (encoder , & desc );
13211317 wgpuComputePassEncoderSetPipeline (pass , r -> tiles .clear_pso );
13221318 wgpuComputePassEncoderSetBindGroup (pass , 0 , r -> binding .binning_bindgroup , 0 , NULL );
13231319 wgpuComputePassEncoderSetBindGroup (pass , 1 , r -> binding .frame_bindgroup [buffer_index ], 0 , NULL );
@@ -1328,7 +1324,8 @@ void od_end_frame(struct onedraw* r, WGPUTextureView target_view)
13281324
13291325 // binning pass
13301326 {
1331- WGPUComputePassEncoder pass = wgpuCommandEncoderBeginComputePass (encoder , NULL );
1327+ WGPUComputePassDescriptor desc = {.label = WGPU_STRING_VIEW ("binning pass" )};
1328+ WGPUComputePassEncoder pass = wgpuCommandEncoderBeginComputePass (encoder , & desc );
13321329 wgpuComputePassEncoderSetPipeline (pass , r -> tiles .binning_pso );
13331330 wgpuComputePassEncoderSetBindGroup (pass , 0 , r -> binding .binning_bindgroup , 0 , NULL );
13341331 wgpuComputePassEncoderSetBindGroup (pass , 1 , r -> binding .frame_bindgroup [buffer_index ], 0 , NULL );
@@ -1339,7 +1336,8 @@ void od_end_frame(struct onedraw* r, WGPUTextureView target_view)
13391336
13401337 // write indirect params pass
13411338 {
1342- WGPUComputePassEncoder pass = wgpuCommandEncoderBeginComputePass (encoder , NULL );
1339+ WGPUComputePassDescriptor desc = {.label = WGPU_STRING_VIEW ("write_indirect_params pass" )};
1340+ WGPUComputePassEncoder pass = wgpuCommandEncoderBeginComputePass (encoder , & desc );
13431341 wgpuComputePassEncoderSetPipeline (pass , r -> tiles .write_indirect_buffer_pso );
13441342 wgpuComputePassEncoderSetBindGroup (pass , 0 , r -> binding .binning_bindgroup , 0 , NULL );
13451343 wgpuComputePassEncoderSetBindGroup (pass , 1 , r -> binding .frame_bindgroup [buffer_index ], 0 , NULL );
@@ -1364,7 +1362,7 @@ void od_end_frame(struct onedraw* r, WGPUTextureView target_view)
13641362 .colorAttachmentCount = 1 ,
13651363 .colorAttachments = & color_attachment ,
13661364 .depthStencilAttachment = NULL ,
1367- .label = WGPU_STRING_VIEW ("rasterization_pass " )
1365+ .label = WGPU_STRING_VIEW ("rasterization pass " )
13681366 };
13691367
13701368
0 commit comments