Skip to content

Commit b18e6f0

Browse files
committed
Improved AllocatorPimpl::GetResourceAllocationInfo to support 1D and 3D textures when D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 2
Based on GPUOpen-LibrariesAndSDKs#79, GPUOpen-LibrariesAndSDKs#78
1 parent 330170f commit b18e6f0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.25)
22

3-
project(D3D12MemoryAllocator VERSION 3.0.1)
3+
project(D3D12MemoryAllocator VERSION 3.0.2)
44

55
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
66

include/D3D12MemAlloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/** \mainpage D3D12 Memory Allocator
2626
27-
<b>Version 3.0.1</b> (2025-05-08)
27+
<b>Version 3.0.2</b> (2025-XX-XX)
2828
2929
Copyright (c) 2019-2025 Advanced Micro Devices, Inc. All rights reserved. \n
3030
License: MIT

src/D3D12MemAlloc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7793,7 +7793,9 @@ HRESULT AllocatorPimpl::GetResourceAllocationInfo(
77937793

77947794
#if D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT
77957795
if (inOutResourceDesc.Alignment == 0 &&
7796-
inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D &&
7796+
(inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE1D ||
7797+
inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D ||
7798+
inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D) &&
77977799
(inOutResourceDesc.Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) == 0
77987800
#if D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT == 1
77997801
&& CanUseSmallAlignment(inOutResourceDesc)

0 commit comments

Comments
 (0)