mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
Fix 5385 by updating the documentation (#5386)
* Fix 5385 by updating the documentation * Update changelog
This commit is contained in:
parent
6040820099
commit
6a5418b93f
@ -55,6 +55,7 @@ By @cwfitzgerald in [#5325](https://github.com/gfx-rs/wgpu/pull/5325).
|
||||
|
||||
- Document Wayland specific behavior related to `SurfaceTexture::present`. By @i509VCB in [#5092](https://github.com/gfx-rs/wgpu/pull/5092).
|
||||
- Add mention of primitive restart in the description of `PrimitiveState::strip_index_format`. By @cpsdqs in [#5350](https://github.com/gfx-rs/wgpu/pull/5350)
|
||||
- Document precise behaviour of `SourceLocation`. By @stefnotch in [#5386](https://github.com/gfx-rs/wgpu/pull/5386)
|
||||
|
||||
### New features
|
||||
|
||||
|
@ -104,16 +104,17 @@ impl std::ops::Index<Span> for str {
|
||||
|
||||
/// A human-readable representation for a span, tailored for text source.
|
||||
///
|
||||
/// Corresponds to the positional members of [`GPUCompilationMessage`][gcm] from
|
||||
/// the WebGPU specification, except that `offset` and `length` are in bytes
|
||||
/// (UTF-8 code units), instead of UTF-16 code units.
|
||||
/// Roughly corresponds to the positional members of [`GPUCompilationMessage`][gcm] from
|
||||
/// the WebGPU specification, except
|
||||
/// - `offset` and `length` are in bytes (UTF-8 code units), instead of UTF-16 code units.
|
||||
/// - `line_position` counts entire Unicode code points, instead of UTF-16 code units.
|
||||
///
|
||||
/// [gcm]: https://www.w3.org/TR/webgpu/#gpucompilationmessage
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub struct SourceLocation {
|
||||
/// 1-based line number.
|
||||
pub line_number: u32,
|
||||
/// 1-based column of the start of this span
|
||||
/// 1-based column of the start of this span, counted in Unicode code points.
|
||||
pub line_position: u32,
|
||||
/// 0-based Offset in code units (in bytes) of the start of the span.
|
||||
pub offset: u32,
|
||||
|
Loading…
Reference in New Issue
Block a user