@@ -53,15 +53,16 @@ class RenderingDeviceDriverWebGpu : public RenderingDeviceDriver {
53
53
struct TextureInfo {
54
54
public:
55
55
WGPUTexture texture;
56
- WGPUTextureFormat format;
57
- WGPUTextureUsage usage;
58
- bool is_original_texture;
59
56
WGPUTextureView view;
60
- uint32_t width;
61
- uint32_t height;
62
- uint32_t depth_or_array;
57
+
58
+ // TODO: nextInChain is not preserved.
59
+ WGPUTextureDescriptor texture_desc;
60
+ WGPUTextureViewDescriptor texture_view_desc;
61
+
62
+ RDD::DataFormat rd_texture_format;
63
+
64
+ bool is_original_texture;
63
65
bool is_using_depth;
64
- uint32_t mip_level_count;
65
66
};
66
67
67
68
// Keep track of existing mirror textures to ensure we don't write to a deleted texture.
@@ -341,22 +342,20 @@ class RenderingDeviceDriverWebGpu : public RenderingDeviceDriver {
341
342
};
342
343
343
344
Vector<uint8_t > push_constant_data;
344
-
345
345
};
346
346
347
347
struct ComputePassEncoderInfo {
348
348
Vector<ComputePassEncoderCommand> commands;
349
349
};
350
350
351
351
struct CommandBufferInfo {
352
- WGPUCommandEncoder encoder;
353
- bool is_render_pass_active;
354
- RenderPassEncoderInfo active_render_pass_info;
355
- ComputePassEncoderInfo active_compute_pass_info;
352
+ WGPUCommandEncoder encoder = nullptr ;
353
+ bool is_render_pass_active = false ;
354
+ RenderPassEncoderInfo active_render_pass_info = RenderPassEncoderInfo() ;
355
+ ComputePassEncoderInfo active_compute_pass_info = ComputePassEncoderInfo() ;
356
356
};
357
357
358
358
public:
359
-
360
359
virtual CommandBufferID command_buffer_create (CommandPoolID p_cmd_pool) override final ;
361
360
virtual bool command_buffer_begin (CommandBufferID p_cmd_buffer) override final ;
362
361
virtual bool command_buffer_begin_secondary (CommandBufferID p_cmd_buffer, RenderPassID p_render_pass, uint32_t p_subpass, FramebufferID p_framebuffer) override final ;
@@ -520,6 +519,8 @@ class RenderingDeviceDriverWebGpu : public RenderingDeviceDriver {
520
519
WGPUStoreOp store_op;
521
520
WGPULoadOp stencil_load_op;
522
521
WGPUStoreOp stencil_store_op;
522
+ bool is_depth_stencil;
523
+ bool is_depth_stencil_read_only;
523
524
};
524
525
525
526
struct RenderPassInfo {
0 commit comments