Skip to content

Commit 4fe6176

Browse files
authored
Remove never-constructed CreateBlasError::InvalidAabbStride (gfx-rs#9935)
1 parent 1a3a4cc commit 4fe6176

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Bottom level categories:
6868
- Validate pipeline layout `immediate_size` and fix its calculation when there are multiple immediate variables. Now it must be >= required size of the shader entry point. By @beicause in [#9711](https://github.com/gfx-rs/wgpu/pull/9711).
6969
- [`immediate_address_space`](https://www.w3.org/TR/WGSL/#language_extension-immediate_address_space) WGSL language extension is implemented. By @beicause in [#9711](https://github.com/gfx-rs/wgpu/pull/9711).
7070
- `TextureFormat::is_srgb()` has been renamed to `TextureFormat::has_srgb_suffix()` to clarify its function. By @kpreid in [#9758](https://github.com/gfx-rs/wgpu/pull/9758).
71+
- Remove the never-constructed `CreateBlasError::InvalidAabbStride` variant. `create_blas` takes no stride, so it could never be produced; AABB stride is validated at build time as `BuildAccelerationStructureError::InvalidAabbStride`. By @mstampfli in [#9935](https://github.com/gfx-rs/wgpu/pull/9935).
7172

7273
#### naga
7374

wgpu-core/src/ray_tracing.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ pub enum CreateBlasError {
4848
"Limit `max_blas_primitive_count` is {0}, but the BLAS had a maximum of {1} primitives"
4949
)]
5050
TooManyPrimitives(u32, u32),
51-
#[error("AABB geometry stride {0} is invalid (must be >= {1} and a multiple of 8)")]
52-
InvalidAabbStride(BufferAddress, BufferAddress),
5351
}
5452

5553
impl WebGpuError for CreateBlasError {
@@ -60,8 +58,7 @@ impl WebGpuError for CreateBlasError {
6058
Self::MissingIndexData
6159
| Self::InvalidVertexFormat(..)
6260
| Self::TooManyGeometries(..)
63-
| Self::TooManyPrimitives(..)
64-
| Self::InvalidAabbStride(..) => ErrorType::Validation,
61+
| Self::TooManyPrimitives(..) => ErrorType::Validation,
6562
}
6663
}
6764
}

0 commit comments

Comments
 (0)