mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Validate the range in map_async. (#2876)
* Validate the range in map_async. * Add an entry in the changelog.
This commit is contained in:
parent
db24c066cb
commit
af345cd6c3
@ -50,6 +50,7 @@ Bottom level categories:
|
|||||||
- Improve the validation and error reporting of buffer mappings by @nical in [#2848](https://github.com/gfx-rs/wgpu/pull/2848)
|
- Improve the validation and error reporting of buffer mappings by @nical in [#2848](https://github.com/gfx-rs/wgpu/pull/2848)
|
||||||
- Fix bind group / pipeline deduplication not taking into account RenderBundle execution resetting these values by @shoebe [#2867](https://github.com/gfx-rs/wgpu/pull/2867)
|
- Fix bind group / pipeline deduplication not taking into account RenderBundle execution resetting these values by @shoebe [#2867](https://github.com/gfx-rs/wgpu/pull/2867)
|
||||||
- Fix panics that occur when using `as_hal` functions when the hal generic type does not match the hub being looked up in by @i509VCB [#2871](https://github.com/gfx-rs/wgpu/pull/2871)
|
- Fix panics that occur when using `as_hal` functions when the hal generic type does not match the hub being looked up in by @i509VCB [#2871](https://github.com/gfx-rs/wgpu/pull/2871)
|
||||||
|
- Add some validation in map_async by @nical in [#2876](https://github.com/gfx-rs/wgpu/pull/2876)
|
||||||
|
|
||||||
#### DX12
|
#### DX12
|
||||||
- `DownlevelCapabilities::default()` now returns the `ANISOTROPIC_FILTERING` flag set to true so DX12 lists `ANISOTROPIC_FILTERING` as true again by @cwfitzgerald in [#2851](https://github.com/gfx-rs/wgpu/pull/2851)
|
- `DownlevelCapabilities::default()` now returns the `ANISOTROPIC_FILTERING` flag set to true so DX12 lists `ANISOTROPIC_FILTERING` as true again by @cwfitzgerald in [#2851](https://github.com/gfx-rs/wgpu/pull/2851)
|
||||||
|
|||||||
@ -5428,6 +5428,16 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
|||||||
return Err((op, e.into()));
|
return Err((op, e.into()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if range.end > buffer.size {
|
||||||
|
return Err((
|
||||||
|
op,
|
||||||
|
BufferAccessError::OutOfBoundsOverrun {
|
||||||
|
index: range.end,
|
||||||
|
max: buffer.size,
|
||||||
|
},
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
buffer.map_state = match buffer.map_state {
|
buffer.map_state = match buffer.map_state {
|
||||||
resource::BufferMapState::Init { .. } | resource::BufferMapState::Active { .. } => {
|
resource::BufferMapState::Init { .. } | resource::BufferMapState::Active { .. } => {
|
||||||
return Err((op, BufferAccessError::AlreadyMapped));
|
return Err((op, BufferAccessError::AlreadyMapped));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user