Fixes for some platforms
diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp
index 01175b1..67b53ed 100644
--- a/src/D3D12MemAlloc.cpp
+++ b/src/D3D12MemAlloc.cpp
@@ -5193,29 +5193,29 @@
void Allocation::PackedData::SetType(Type type)
{
- const uint32_t u = (UINT)type;
+ const UINT u = (UINT)type;
D3D12MA_ASSERT(u < (1u << 2));
m_Type = u;
}
void Allocation::PackedData::SetResourceDimension(D3D12_RESOURCE_DIMENSION resourceDimension)
{
- const uint32_t u = (UINT)resourceDimension;
+ const UINT u = (UINT)resourceDimension;
D3D12MA_ASSERT(u < (1u << 3));
m_ResourceDimension = u;
}
void Allocation::PackedData::SetResourceFlags(D3D12_RESOURCE_FLAGS resourceFlags)
{
- const uint32_t u = (UINT)resourceFlags;
- D3D12MA_ASSERT(u < (1u << 7));
+ const UINT u = (UINT)resourceFlags;
+ D3D12MA_ASSERT(u < (1u << 24));
m_ResourceFlags = u;
}
void Allocation::PackedData::SetTextureLayout(D3D12_TEXTURE_LAYOUT textureLayout)
{
- const uint32_t u = (UINT)textureLayout;
- D3D12MA_ASSERT(u < (1u << 2));
+ const UINT u = (UINT)textureLayout;
+ D3D12MA_ASSERT(u < (1u << 9));
m_TextureLayout = u;
}
diff --git a/src/D3D12MemAlloc.h b/src/D3D12MemAlloc.h
index 87dde11..9a675aa 100644
--- a/src/D3D12MemAlloc.h
+++ b/src/D3D12MemAlloc.h
@@ -656,8 +656,8 @@
private:
UINT m_Type : 2; // enum Type
UINT m_ResourceDimension : 3; // enum D3D12_RESOURCE_DIMENSION
- UINT m_ResourceFlags : 7; // flags D3D12_RESOURCE_FLAGS
- UINT m_TextureLayout : 2; // enum D3D12_TEXTURE_LAYOUT
+ UINT m_ResourceFlags : 24; // flags D3D12_RESOURCE_FLAGS
+ UINT m_TextureLayout : 9; // enum D3D12_TEXTURE_LAYOUT
UINT m_WasZeroInitialized : 1; // BOOL
} m_PackedData;