mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Remove get_buffer alias of resolve_buffer_id
This commit is contained in:
parent
5ac2ed19cb
commit
c6dc8eeac5
@ -434,20 +434,13 @@ impl Player {
|
||||
}
|
||||
}
|
||||
|
||||
fn resolve_buffer_id(
|
||||
pub fn resolve_buffer_id(
|
||||
&self,
|
||||
id: wgc::id::PointerId<wgc::id::markers::Buffer>,
|
||||
) -> Arc<wgc::resource::Buffer> {
|
||||
self.buffers.get(&id).expect("invalid buffer").clone()
|
||||
}
|
||||
|
||||
pub fn get_buffer(
|
||||
&self,
|
||||
id: wgc::id::PointerId<wgc::id::markers::Buffer>,
|
||||
) -> Arc<wgc::resource::Buffer> {
|
||||
self.resolve_buffer_id(id)
|
||||
}
|
||||
|
||||
fn resolve_texture_id(
|
||||
&self,
|
||||
id: wgc::id::PointerId<wgc::id::markers::Texture>,
|
||||
|
||||
@ -103,7 +103,7 @@ impl Test<'_> {
|
||||
println!("\t\t\tMapping...");
|
||||
for expect in &self.expectations {
|
||||
player
|
||||
.get_buffer(expect.buffer)
|
||||
.resolve_buffer_id(expect.buffer)
|
||||
.map_async(
|
||||
expect.offset,
|
||||
Some(expect.data.len() as u64),
|
||||
@ -116,16 +116,17 @@ impl Test<'_> {
|
||||
}
|
||||
|
||||
println!("\t\t\tWaiting...");
|
||||
device.poll(wgt::PollType::Wait {
|
||||
submission_index: None,
|
||||
timeout: Some(std::time::Duration::from_secs(1)), // Tests really shouldn't need longer than that!
|
||||
})
|
||||
.unwrap();
|
||||
device
|
||||
.poll(wgt::PollType::Wait {
|
||||
submission_index: None,
|
||||
timeout: Some(std::time::Duration::from_secs(1)), // Tests really shouldn't need longer than that!
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
for expect in self.expectations {
|
||||
println!("\t\t\tChecking {}", expect.name);
|
||||
let (ptr, size) = player
|
||||
.get_buffer(expect.buffer)
|
||||
.resolve_buffer_id(expect.buffer)
|
||||
.get_mapped_range(expect.offset, Some(expect.data.len() as wgt::BufferAddress))
|
||||
.unwrap();
|
||||
let contents = unsafe { slice::from_raw_parts(ptr.as_ptr(), size as usize) };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user