Disabled usage of small alignment when tight alignment is enabled in AllocatorPimpl::GetResourceAllocationInfo Hopefully fixes https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator/issues/83 - thanks @rtryan98
diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp index 0666868..f01c85c 100644 --- a/src/D3D12MemAlloc.cpp +++ b/src/D3D12MemAlloc.cpp
@@ -7849,6 +7849,7 @@ #if D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT if (inOutResourceDesc.Alignment == 0 && + !IsTightAlignmentEnabled() && (inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE1D || inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D || inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D) &&
diff --git a/src/D3D12Sample.cpp b/src/D3D12Sample.cpp index 40b8185..32c5147 100644 --- a/src/D3D12Sample.cpp +++ b/src/D3D12Sample.cpp
@@ -605,8 +605,8 @@ assert(0); } - wprintf(L"D3D12_FEATURE_DATA_D3D12_OPTIONS16:\n"); - wprintf(L" GPUUploadHeapSupported = %u\n", g_Allocator->IsGPUUploadHeapSupported() ? 1 : 0); + wprintf(L"GPUUploadHeapSupported = %u\n", g_Allocator->IsGPUUploadHeapSupported() ? 1 : 0); + wprintf(L"TightAlignmentSupported = %u\n", g_Allocator->IsTightAlignmentSupported() ? 1 : 0); ComPtr<IDXGIAdapter3> adapter3; if(SUCCEEDED(adapter->QueryInterface(IID_PPV_ARGS(&adapter3))))