diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
commit | 36fdf081022aae4b21758fe23422ead88c9ca9d6 (patch) | |
tree | 43fba12057c7e2f4350b4b5250f659b742ea2b61 | |
parent | c9fb3ae28fe491bc55243fb80d8c6be93f37ad99 (diff) |
fix(tex): less restrictive for staging memory
-rw-r--r-- | stockton-render/src/draw/texture/loader.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stockton-render/src/draw/texture/loader.rs b/stockton-render/src/draw/texture/loader.rs index 96b1646..df82607 100644 --- a/stockton-render/src/draw/texture/loader.rs +++ b/stockton-render/src/draw/texture/loader.rs @@ -235,7 +235,8 @@ impl<R: TextureResolver> TextureLoader<R> { DynamicAllocator::new( find_memory_type_id(&adapter, type_mask, props) - .ok_or(TextureLoaderError::NoMemoryTypes)?, + .ok_or(TextureLoaderError::NoMemoryTypes) + .context("Couldn't create tex memory allocator")?, props, DynamicConfig { block_size_granularity: 4 * 32 * 32, // 32x32 image @@ -248,8 +249,9 @@ impl<R: TextureResolver> TextureLoader<R> { let (staging_memory_type, mut staging_allocator) = { let props = MemProps::CPU_VISIBLE | MemProps::COHERENT; - let t = find_memory_type_id(&adapter, type_mask, props) - .ok_or(TextureLoaderError::NoMemoryTypes)?; + let t = find_memory_type_id(&adapter, u32::MAX, props) + .ok_or(TextureLoaderError::NoMemoryTypes) + .context("Couldn't create staging memory allocator")?; ( t, DynamicAllocator::new( |