From f8724d459c05c04c172057a54781663aaf96e9b2 Mon Sep 17 00:00:00 2001 From: swfly Date: Mon, 2 Dec 2024 10:43:10 +0800 Subject: [PATCH] fallback: tex3d update --- src/backends/fallback/fallback_texture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backends/fallback/fallback_texture.cpp b/src/backends/fallback/fallback_texture.cpp index e64328180..cd4b053e3 100644 --- a/src/backends/fallback/fallback_texture.cpp +++ b/src/backends/fallback/fallback_texture.cpp @@ -196,6 +196,7 @@ FallbackTexture::FallbackTexture(PixelStorage storage, uint dim, uint3 size, uin auto size_pixels = _mip_offsets[levels - 1u] + s.x * s.y; _data = luisa::allocate_with_allocator(static_cast(size_pixels) << _pixel_stride_shift); } else { + _pixel_stride_shift = std::bit_width(static_cast(pixel_storage_size(storage, make_uint3(1u)))) - 1u; _size[0] = size.x; _size[1] = size.y; _size[2] = size.z;