From 36fdf081022aae4b21758fe23422ead88c9ca9d6 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:23 +0100 Subject: fix(tex): less restrictive for staging memory --- stockton-render/src/draw/texture/loader.rs | 8 +++++--- 1 file 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 TextureLoader { 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 TextureLoader { 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( -- cgit v1.2.3