webgpu: Update wgpu and revamp RenderPass (#32665)

* Update wgpu and revamp RenderPass

* Set good expectations

* Set one bad expectation

* send_render_command

* small fixups

* docs

* doc

* Put RenderPass inside PassState

* Use Pass enum for ComputePass too

* fix docs
This commit is contained in:
Samson 2024-07-04 14:16:42 +02:00 committed by GitHub
parent 26624a109f
commit 99c1f886b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 559 additions and 1032 deletions

View file

@ -5,13 +5,17 @@
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use serde::{Deserialize, Serialize};
pub use crate::wgc::id::markers::ComputePassEncoder as ComputePass;
pub use crate::wgc::id::ComputePassEncoderId as ComputePassId;
pub use crate::wgc::id::markers::{
ComputePassEncoder as ComputePass, RenderPassEncoder as RenderPass,
};
use crate::wgc::id::{
AdapterId, BindGroupId, BindGroupLayoutId, BufferId, CommandBufferId, CommandEncoderId,
ComputePipelineId, DeviceId, PipelineLayoutId, QueueId, RenderBundleId, RenderPipelineId,
SamplerId, ShaderModuleId, SurfaceId, TextureId, TextureViewId,
};
pub use crate::wgc::id::{
ComputePassEncoderId as ComputePassId, RenderPassEncoderId as RenderPassId,
};
macro_rules! webgpu_resource {
($name:ident, $id:ty) => {
@ -46,3 +50,4 @@ webgpu_resource!(WebGPUSurface, SurfaceId);
webgpu_resource!(WebGPUTexture, TextureId);
webgpu_resource!(WebGPUTextureView, TextureViewId);
webgpu_resource!(WebGPUComputePass, ComputePassId);
webgpu_resource!(WebGPURenderPass, RenderPassId);