Skip to content

Commit

Permalink
Fix ShadowMapManager ShadowMap alignment (#8398)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflinger authored and bejado committed Jan 29, 2025
1 parent a495d90 commit 031981a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filament/src/ShadowMapManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class ShadowMapManager {
// Inline storage for all our ShadowMap objects, we can't easily use a std::array<> directly.
// Because ShadowMap doesn't have a default ctor, and we avoid out-of-line allocations.
// Each ShadowMap is currently 88 bytes (total of ~12KB for 128 shadow maps)
using ShadowMapStorage = std::aligned_storage<sizeof(ShadowMap)>::type;
using ShadowMapStorage = std::aligned_storage_t<sizeof(ShadowMap), alignof(ShadowMap)>;
using ShadowMapCacheContainer = std::array<ShadowMapStorage, CONFIG_MAX_SHADOWMAPS>;
ShadowMapCacheContainer mShadowMapCache;
uint32_t mDirectionalShadowMapCount = 0;
Expand Down

0 comments on commit 031981a

Please sign in to comment.