Fix for render_with_compute in browsers (#9529)

This commit is contained in:
k9
2026-05-12 17:14:27 -04:00
committed by GitHub
parent 1546cca5ed
commit 265a7f9e0b

View File

@@ -3,7 +3,7 @@
//! therefore not recommended to use this code, at least until
//! <https://bugzilla.mozilla.org/show_bug.cgi?id=1870699> (and possibly further work) is resolved.
use std::time::Instant;
use web_time::Instant;
#[derive(bytemuck::Pod, bytemuck::Zeroable, Clone, Copy, Debug)]
#[repr(C)]
@@ -70,7 +70,7 @@ impl crate::framework::Example for Example {
compilation_options: Default::default(),
cache: None,
});
let blitter = wgpu::util::TextureBlitter::new(device, config.format);
let blitter = wgpu::util::TextureBlitter::new(device, config.view_formats[0]);
let global_params = device.create_buffer(&wgpu::BufferDescriptor {
label: None,
size: size_of::<GlobalParams>() as u64,