From f0943cfca2be3ea53a8e6cb3211d6707eb89d8f5 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 12 Jun 2023 19:33:18 -0700 Subject: [PATCH] align uniform buffer to 16 bytes this is needed on armv7 because we use alignas to get strcture-alignment, but that also implies (to the compiler) that the structure itself is aligned properly. --- filament/src/PerShadowMapUniforms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filament/src/PerShadowMapUniforms.cpp b/filament/src/PerShadowMapUniforms.cpp index 465e5920fe..bcb4858be4 100644 --- a/filament/src/PerShadowMapUniforms.cpp +++ b/filament/src/PerShadowMapUniforms.cpp @@ -107,7 +107,7 @@ void PerShadowMapUniforms::prepareShadowMapping(Transaction const& transaction, PerShadowMapUniforms::Transaction PerShadowMapUniforms::open(backend::DriverApi& driver) noexcept { Transaction transaction; // TODO: use out-of-line buffer if too large - transaction.uniforms = (PerViewUib *)driver.allocate(sizeof(PerViewUib)); + transaction.uniforms = (PerViewUib *)driver.allocate(sizeof(PerViewUib), 16); assert_invariant(transaction.uniforms); return transaction; }