Fix multiple issues from the refactoring

- Update texture view on grow
- Fix atlas texture coordinates
- Fix fragmented uploads
This commit is contained in:
Héctor Ramón Jiménez 2020-02-26 18:49:46 +01:00
parent c58d94f3fd
commit 48d70280eb
4 changed files with 86 additions and 42 deletions

View file

@ -83,10 +83,9 @@ impl Cache {
if let Memory::Host(image) = memory {
let (width, height) = image.dimensions();
let allocation =
atlas.upload(width, height, &image, device, encoder)?;
let entry = atlas.upload(width, height, &image, device, encoder)?;
*memory = Memory::Device(allocation);
*memory = Memory::Device(entry);
}
if let Memory::Device(allocation) = memory {