mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-09 22:20:06 +00:00
Fixes for some platforms
This commit is contained in:
parent
79db457378
commit
397a9b3973
@ -5193,29 +5193,29 @@ void AllocatorPimpl::WriteBudgetToJson(JsonWriter& json, const Budget& budget)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -656,8 +656,8 @@ private:
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user