Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Src/EffectCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ _Use_decl_annotations_ void XM_CALLCONV EffectFog::SetConstants(int& dirtyFlags,
// Constructor initializes default material color settings.
EffectColor::EffectColor() noexcept
: diffuseColor(g_XMOne),
alpha(1.f)
alpha(1.f),
padding(0)
{}

// Lazily recomputes the material color parameter for shaders that do not support realtime lighting.
Expand Down
6 changes: 5 additions & 1 deletion Src/EffectCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace DirectX

XMVECTOR diffuseColor;
float alpha;
uint64_t padding; // Pad to 16-byte boundary (needed for ARM64)

void SetConstants(_Inout_ int& dirtyFlags, _Inout_ XMVECTOR& diffuseColorConstant);
};
Expand Down Expand Up @@ -177,7 +178,8 @@ namespace DirectX
: constants{},
dirtyFlags(INT_MAX),
mConstantBuffer(device),
mDeviceResources(deviceResourcesPool.DemandCreate(device))
mDeviceResources(deviceResourcesPool.DemandCreate(device)),
padding(0)
{
SetDebugObjectName(mConstantBuffer.GetBuffer(), "Effect");
}
Expand Down Expand Up @@ -317,6 +319,8 @@ namespace DirectX
// Per-device resources.
std::shared_ptr<DeviceResources> mDeviceResources;

uint64_t padding; // Pad to 16-byte boundary (needed for ARM64)

static SharedResourcePool<ID3D11Device*, DeviceResources> deviceResourcesPool;
};
} // namespace DirectX
Loading