diff options
Diffstat (limited to 'third_party/rust/wgpu-types/src/lib.rs')
-rw-r--r-- | third_party/rust/wgpu-types/src/lib.rs | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/third_party/rust/wgpu-types/src/lib.rs b/third_party/rust/wgpu-types/src/lib.rs index 347aad76f9..b36801e941 100644 --- a/third_party/rust/wgpu-types/src/lib.rs +++ b/third_party/rust/wgpu-types/src/lib.rs @@ -337,7 +337,7 @@ bitflags::bitflags! { /// For arbitrary timestamp write commands on encoders refer to [`Features::TIMESTAMP_QUERY_INSIDE_ENCODERS`]. /// For arbitrary timestamp write commands on passes refer to [`Features::TIMESTAMP_QUERY_INSIDE_PASSES`]. /// - /// They must be resolved using [`CommandEncoder::resolve_query_sets`] into a buffer, + /// They must be resolved using [`CommandEncoder::resolve_query_set`] into a buffer, /// then the result must be multiplied by the timestamp period [`Queue::get_timestamp_period`] /// to get the timestamp in nanoseconds. Multiple timestamps can then be diffed to get the /// time for operations between them to finish. @@ -480,10 +480,10 @@ bitflags::bitflags! { // API: /// Enables use of Pipeline Statistics Queries. These queries tell the count of various operations - /// performed between the start and stop call. Call [`RenderPassEncoder::begin_pipeline_statistics_query`] to start - /// a query, then call [`RenderPassEncoder::end_pipeline_statistics_query`] to stop one. + /// performed between the start and stop call. Call [`RenderPass::begin_pipeline_statistics_query`] to start + /// a query, then call [`RenderPass::end_pipeline_statistics_query`] to stop one. /// - /// They must be resolved using [`CommandEncoder::resolve_query_sets`] into a buffer. + /// They must be resolved using [`CommandEncoder::resolve_query_set`] into a buffer. /// The rules on how these resolve into buffers are detailed in the documentation for [`PipelineStatisticsTypes`]. /// /// Supported Platforms: @@ -511,8 +511,8 @@ bitflags::bitflags! { /// Implies [`Features::TIMESTAMP_QUERY`] & [`Features::TIMESTAMP_QUERY_INSIDE_ENCODERS`] is supported. /// /// Additionally allows for timestamp queries to be used inside render & compute passes using: - /// - [`RenderPassEncoder::write_timestamp`] - /// - [`ComputePassEncoder::write_timestamp`] + /// - [`RenderPass::write_timestamp`] + /// - [`ComputePass::write_timestamp`] /// /// Supported platforms: /// - Vulkan @@ -682,7 +682,14 @@ bitflags::bitflags! { /// Allows the user to call [`RenderPass::set_push_constants`], provide a non-empty array /// to [`PipelineLayoutDescriptor`], and provide a non-zero limit to [`Limits::max_push_constant_size`]. /// - /// A block of push constants can be declared with `layout(push_constant) uniform Name {..}` in shaders. + /// A block of push constants can be declared in WGSL with `var<push_constant>`: + /// + /// ```rust,ignore + /// struct PushConstants { example: f32, } + /// var<push_constant> c: PushConstants; + /// ``` + /// + /// In GLSL, this corresponds to `layout(push_constant) uniform Name {..}`. /// /// Supported platforms: /// - DX12 @@ -7183,7 +7190,7 @@ mod send_sync { /// /// Corresponds to [WebGPU `GPUDeviceLostReason`](https://gpuweb.github.io/gpuweb/#enumdef-gpudevicelostreason). #[repr(u8)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum DeviceLostReason { /// Triggered by driver Unknown = 0, @@ -7203,4 +7210,10 @@ pub enum DeviceLostReason { /// exactly once before it is dropped, which helps with managing the /// memory owned by the callback. ReplacedCallback = 3, + /// When setting the callback, but the device is already invalid + /// + /// As above, when the callback is provided, wgpu guarantees that it + /// will eventually be called. If the device is already invalid, wgpu + /// will call the callback immediately, with this reason. + DeviceInvalid = 4, } |