mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
fix: req. TIMESTAMP_QUERY
feat. for <pass desc.>::timestamp_writes
This commit is contained in:
parent
080d99b5bf
commit
2e46a6c9c9
@ -58,6 +58,12 @@ Bottom level categories:
|
|||||||
|
|
||||||
- Change the `DropCallback` API to use `FnOnce` instead of `FnMut`. By @jerzywilczek in [#6482](https://github.com/gfx-rs/wgpu/pull/6482)
|
- Change the `DropCallback` API to use `FnOnce` instead of `FnMut`. By @jerzywilczek in [#6482](https://github.com/gfx-rs/wgpu/pull/6482)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
#### General
|
||||||
|
|
||||||
|
- Ensure that `Features::TIMESTAMP_QUERY` is set when using timestamp writes in render and compute passes. By @ErichDonGubler in [#6497](https://github.com/gfx-rs/wgpu/pull/6497).
|
||||||
|
|
||||||
## 23.0.0 (2024-10-25)
|
## 23.0.0 (2024-10-25)
|
||||||
|
|
||||||
### Themes of this release
|
### Themes of this release
|
||||||
|
@ -308,6 +308,14 @@ impl Global {
|
|||||||
};
|
};
|
||||||
|
|
||||||
arc_desc.timestamp_writes = if let Some(tw) = desc.timestamp_writes {
|
arc_desc.timestamp_writes = if let Some(tw) = desc.timestamp_writes {
|
||||||
|
match cmd_buf
|
||||||
|
.device
|
||||||
|
.require_features(wgt::Features::TIMESTAMP_QUERY)
|
||||||
|
{
|
||||||
|
Ok(()) => (),
|
||||||
|
Err(e) => return make_err(e.into(), arc_desc),
|
||||||
|
}
|
||||||
|
|
||||||
let query_set = match hub.query_sets.get(tw.query_set).get() {
|
let query_set = match hub.query_sets.get(tw.query_set).get() {
|
||||||
Ok(query_set) => query_set,
|
Ok(query_set) => query_set,
|
||||||
Err(e) => return make_err(e.into(), arc_desc),
|
Err(e) => return make_err(e.into(), arc_desc),
|
||||||
|
@ -26,7 +26,7 @@ pub use timestamp_writes::PassTimestampWrites;
|
|||||||
|
|
||||||
use self::memory_init::CommandBufferTextureMemoryActions;
|
use self::memory_init::CommandBufferTextureMemoryActions;
|
||||||
|
|
||||||
use crate::device::{Device, DeviceError};
|
use crate::device::{Device, DeviceError, MissingFeatures};
|
||||||
use crate::lock::{rank, Mutex};
|
use crate::lock::{rank, Mutex};
|
||||||
use crate::snatch::SnatchGuard;
|
use crate::snatch::SnatchGuard;
|
||||||
|
|
||||||
@ -642,6 +642,8 @@ pub enum CommandEncoderError {
|
|||||||
InvalidColorAttachment(#[from] ColorAttachmentError),
|
InvalidColorAttachment(#[from] ColorAttachmentError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
InvalidResource(#[from] InvalidResourceError),
|
InvalidResource(#[from] InvalidResourceError),
|
||||||
|
#[error(transparent)]
|
||||||
|
MissingFeatures(#[from] MissingFeatures),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Global {
|
impl Global {
|
||||||
|
@ -1393,6 +1393,8 @@ impl Global {
|
|||||||
};
|
};
|
||||||
|
|
||||||
arc_desc.timestamp_writes = if let Some(tw) = desc.timestamp_writes {
|
arc_desc.timestamp_writes = if let Some(tw) = desc.timestamp_writes {
|
||||||
|
device.require_features(wgt::Features::TIMESTAMP_QUERY)?;
|
||||||
|
|
||||||
let query_set = query_sets.get(tw.query_set).get()?;
|
let query_set = query_sets.get(tw.query_set).get()?;
|
||||||
|
|
||||||
Some(ArcPassTimestampWrites {
|
Some(ArcPassTimestampWrites {
|
||||||
|
Loading…
Reference in New Issue
Block a user