use QuerySet.raw() instead of QuerySet.raw.as_ref().unwrap()

This commit is contained in:
teoxoy 2024-08-07 14:36:15 +02:00 committed by Teodor Tanasoaia
parent cf5706c24b
commit b0cc0d2ebc
3 changed files with 5 additions and 7 deletions

View File

@ -507,14 +507,12 @@ impl Global {
// But no point in erroring over that nuance here!
if let Some(range) = range {
unsafe {
state
.raw_encoder
.reset_queries(query_set.raw.as_ref().unwrap(), range);
state.raw_encoder.reset_queries(query_set.raw(), range);
}
}
Some(hal::ComputePassTimestampWrites {
query_set: query_set.raw.as_ref().unwrap(),
query_set: query_set.raw(),
beginning_of_pass_write_index: tw.beginning_of_pass_write_index,
end_of_pass_write_index: tw.end_of_pass_write_index,
})

View File

@ -255,7 +255,7 @@ pub(super) fn end_occlusion_query<A: HalApi>(
active_query: &mut Option<(Arc<QuerySet<A>>, u32)>,
) -> Result<(), QueryUseError> {
if let Some((query_set, query_index)) = active_query.take() {
unsafe { raw_encoder.end_query(query_set.raw.as_ref().unwrap(), query_index) };
unsafe { raw_encoder.end_query(query_set.raw(), query_index) };
Ok(())
} else {
Err(QueryUseError::AlreadyStopped)

View File

@ -1193,7 +1193,7 @@ impl<'d, A: HalApi> RenderPassInfo<'d, A> {
}
Some(hal::RenderPassTimestampWrites {
query_set: query_set.raw.as_ref().unwrap(),
query_set: query_set.raw(),
beginning_of_pass_write_index: tw.beginning_of_pass_write_index,
end_of_pass_write_index: tw.end_of_pass_write_index,
})
@ -1203,7 +1203,7 @@ impl<'d, A: HalApi> RenderPassInfo<'d, A> {
let occlusion_query_set_hal = if let Some(query_set) = occlusion_query_set.as_ref() {
query_set.same_device(device)?;
Some(query_set.raw.as_ref().unwrap())
Some(query_set.raw())
} else {
None
};