Improved AllocatorPimpl::GetResourceAllocationInfo to support 1D and 3D textures when D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 2 Based on https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator/pull/79, https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator/issues/78
diff --git a/CMakeLists.txt b/CMakeLists.txt index 40a45d8..831d43f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.25) -project(D3D12MemoryAllocator VERSION 3.0.1) +project(D3D12MemoryAllocator VERSION 3.0.2) set_property(GLOBAL PROPERTY USE_FOLDERS ON)
diff --git a/include/D3D12MemAlloc.h b/include/D3D12MemAlloc.h index bde66a4..f8c0f71 100644 --- a/include/D3D12MemAlloc.h +++ b/include/D3D12MemAlloc.h
@@ -24,7 +24,7 @@ /** \mainpage D3D12 Memory Allocator -<b>Version 3.0.1</b> (2025-05-08) +<b>Version 3.0.2</b> (2025-XX-XX) Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. \n License: MIT
diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp index fa53586..e637874 100644 --- a/src/D3D12MemAlloc.cpp +++ b/src/D3D12MemAlloc.cpp
@@ -7793,7 +7793,9 @@ #if D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT if (inOutResourceDesc.Alignment == 0 && - inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D && + (inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE1D || + inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D || + inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D) && (inOutResourceDesc.Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) == 0 #if D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT == 1 && CanUseSmallAlignment(inOutResourceDesc)