Hack to fix GL-specific backend issue where if image atlas grows to a layer depth of 6, GL interprets the texture as a cube map vs a 2d texture array

This commit is contained in:
Shan 2025-05-01 08:34:58 -07:00
parent aa2a50110d
commit 16703ccdef
No known key found for this signature in database
GPG key ID: 5F84D2AA40A9F170
5 changed files with 32 additions and 9 deletions

View file

@ -93,6 +93,7 @@ impl Cache {
pub fn upload(
&mut self,
device: &wgpu::Device,
backend: wgpu::Backend,
encoder: &mut wgpu::CommandEncoder,
handle: &svg::Handle,
color: Option<Color>,
@ -167,8 +168,8 @@ impl Cache {
});
}
let allocation =
atlas.upload(device, encoder, width, height, &rgba)?;
let allocation = atlas
.upload(device, backend, encoder, width, height, &rgba)?;
log::debug!("allocating {id} {width}x{height}");